![]() |
|
| Discuss Paintbars in QuoteTracker at the Software within the Traderji.com - Discussion forum for Stocks Commodities & Forex; murthymsr had suggested that we initiate a discussion of Paintbars as used in QuoteTracker. So, ... |
|
|||||||
| Software Charting, trading & technical analysis software, trading system development and backtesting. |
![]() |
|
|
Thread Tools |
|
#1
|
|||
|
|||
|
murthymsr had suggested that we initiate a discussion of Paintbars as used in QuoteTracker. So, here goes... Paintbars are used to embellish graphs based on user specified conditions. Uses include coloring the candles, drawing buy/sell arrows, marking candles with symbols, drawing colored bands / backgrounds or triggering alerts. The user condition could be price and/or indicator values. A paintbar consists of one or more rules. Each rule is written as an if <condition> <action 1> else <action 2> statement. This is simple enough to pickup from QT's help file and one or two examples. A graph could have one or more paintbars both in the top price pane or bottom panes. QT has a editor (Charts->Paintbar Editor) to help create and manage them. Paintbars are saved in paintbar.xml in QT's installation directory. So probably the easiest method of exchange is to post the portion of the XML from that file using Export/Import in the editor or cut-paste. A word of caution: too much should not not be expected from paintbars. They have nothing near the power of, say, Amibroker's afl language . Some basic things missing, such as use of variables, may make writing the rule conditions appear awkward. The absence of a way to write comments prevents them from being self-documented. The idea is to make the best of what is available. |
| Sponsored Links |
|
#2
|
|||
|
|||
|
For QT users who have never used Paintbars, here is a walkthru...
Objective: To mark the first and last half hour as a background to the intraday chart. Steps: - Add a Paintbar - Top indicator to an intraday chart. PBs are treated like all other indicators. - Click Edit next to the newly added PB. - As we have not yet created the PB, click Edit Paintbars on the Parameters for Paintbar dialogue that comes up. - In the PB Editor that comes up, click Add New. - Name the PB. - Add the following two rules. Bar Time refers to the opening time of a bar. Code:
if Bar Time<10:30 set color to Gray if Bar Time>=15:00 set color to Gray ![]() - Save and close to return to the Parameters for Paintbar dialogue. - Select the newly created PB. - Set Show On to Full Background. The completed dialog is: ![]() - Close dialogues and return to Technical Indicators dialogue. Nothing else needs to be done here for this PB. ![]() - The resulting intraday graph would show as: ![]() Notes: - The PB works on line graphs as well. - If you don't like the inbuilt colours, use $bbggrr (blue-green-red) for custom ones such as $202020 for a deeper grey (if Bar Time<10:30 set color to $202020) PB XML for import: MarkInitialLastHalfHour.PBX Last edited by whyLately; 1st August 2009 at 09:42 PM. |
|
#3
|
|||
|
|||
|
Thanks WL for the start of the discussion.
As already pointed by WL, paintbars are simple to build but have limitations on account of it's simplicity. But paintbars are highly useful as a visual tool of simple logic and as an audio tool for working in the background. I used it to get some feel of the market trend. Also paintbars are special to QT, whose source of data is NSE and the data is delayed by about a minute. So this tool is useful when identifying trends in the higher timeframes of 5 minute bars and more. Wish more people join the discussion to enrich the knowledge. One last word though, one day QuoteTracker may come out with a stock broking service for the Indian market with live quotes like it is already doing for international markets. QT with live data export to AB with it's own trading platform is the best that could happen to the Indian trading community. murthymsr |
| The Following User Says Thank You to murthymsr For This Useful Post: | ||
whyLately (1st August 2009) | ||
|
#4
|
|||
|
|||
|
Trading NR7 setup thread.
The objective is to mark NR7 bars in intraday graphs. Also mark NR4/NR5/NR6 as an NR7 bar is these as well. Four paintbars are used in combination, a separate one for each NR type. The PBs are combined to show as a 'histogram' either as a top or bottom indicator. Rules for NR4 PB: Code:
if (Bar High[1] - Bar Low[1]) <= (Bar High[2] - Bar Low[2]) AND (Bar High[1] - Bar Low[1]) <= (Bar High[3] - Bar Low[3]) AND (Bar High[1] - Bar Low[1]) <= (Bar High[4] - Bar Low[4]) set color to $A0F0F0 Properties for top indicator: Show On - Shape Band Bottom, Background, Thick - default, Shape - Filled square, Adjust Width - Yes Properties for bottome indicator: Show On - Band Bottom, Background, Thick - default, Align Candle ![]() Notes: - The rule marks NR7s after the bar has completed, and applies to the previous bar. For intraday graphs, this prevents bar identification changing as quotes come in. For historical charts, you may want to change the rule to use the current bars high/low values in the comparison. - The grey horizontal line below the NR markers in the top graph is a visual nicety. It is a separate dummy PB with rule as if 1=1 set color to Silver. Paintbar XML for import: NR-Intraday.PBX Last edited by whyLately; 2nd September 2009 at 11:02 PM. Reason: Remove unnecessary use of ABS |
|
#5
|
|||
|
|||
|
Swing Buy/Sell based on Price Channel
One trading technique is based on the Highest High/Lowest Low of some previous periods. If the price goes above the High of the last n periods, buy. The stoploss is the Low of the same n periods. Subsequently, the stoploss is moved as the Low changes. When the stoploss is hit, go short with the last n period high as the new stoploss. This is a SAR method and you are always in the trade (it has been said that if a trade is successful, do not take the next one). The main idea is to present this logic with paintbars. Below are two methods -- first as a colored band and second as long-short arrows. In QuoteTracker, the n period high/low is available from the Price Channel top indicator. Buy-Sell Band Single PB, multiple rules. (Properties: Show On: Band Top). Lines beginning with // are documentation comments and not part of the rules. Code:
// Large outside bars cutting across both upper and lower price channel need special handling if (Bar High >= Price Channel.Upper[1] AND Bar Low <= Price Channel.Lower[1]) AND (Bar Close > Bar Open) set color to Lime and stop if (Bar High >= Price Channel.Upper[1] AND Bar Low <= Price Channel.Lower[1]) AND (Bar Close <= Bar Open) set color to Red and stop // Buy hold and Buy rules if (Paintbar[1] = Lime) AND (Bar Low > Price Channel.Lower[1]) set color to Lime and stop if (Paintbar[1] = Red) AND (Bar High >= Price Channel.Upper[1]) set color to Lime and stop // Short hold and Short rules if (Paintbar[1] = Red) AND (Bar High < Price Channel.Upper[1]) set color to Red and stop if (Paintbar[1] = Lime) AND (Bar Low <= Price Channel.Lower[1]) set color to Red and stop // Dummy rule to seed the S&R if 1 = 1 set color to Lime Two PBs, one each for buy and short. Only the Buy Arrow is presented here. (Properties: Show On: Shape Below Candle, Foreground, {shape & thickness to suit}). Code:
// Large outside bar is buy if close is more than open
if (Bar High >= Price Channel.Upper[1]
AND Bar Low <= Price Channel.Lower[1])
AND (Bar Close <= Bar Open)
do nothing and stop
// Buy hold is marked with a dark almost invisible color
if (Paintbar[1] = $00F000 OR Paintbar[1] = $100100)
AND (Bar Low > Price Channel.Lower[1])
set color to $100100 and stop
// Buy trigger
if Bar High >= Price Channel.Upper[1]
set color to $00F000
![]() Notes - The PB does not use any Price Channel parameters. As a result, user-specified values (on adding the Price Channel as the top indicator) are used by the PB. Various period values can be tested without changing the PB. In the image above, Price Channel is based on High/Low, middle line is in Clr color, and uses a period value of 21. Paintbar XML for import: Swing-PriceChannel.PBX |
| The Following 3 Users Say Thank You to whyLately For This Useful Post: | ||
|
#6
|
|||
|
|||
|
Thanks WL for your highly thought provoking PB codes.
But looks like the QT is no longer free after end of the month. One has to subscribe. Subscription for more than a minute delayed quotes of NSE only and a trading platform that cannot be used on Indian stock exchanges may not be attractive. I love QT for it's features, stability and ease of use. I wish QT may tie up with some Indian Brokerage house / Bank to provide a fully integrated 3-in-1 trading account. murthymsr |
| The Following User Says Thank You to murthymsr For This Useful Post: | ||
whyLately (4th September 2009) | ||
|
#7
|
|||
|
|||
|
Quote:
To summarize, it will no longer be free if one uses US Brokers that are competition to Ameritrade (guess this applies to data source plus integrated trading competition only). For us, it is likely to remain free (at least for the recent future). |
|
#8
|
|||
|
|||
|
Quote:
Thanks for the link, which cleared my fear/anxiety. It was a great feeling to see the post by Jerry Medwed, which clarified on this issue. I WAS visiting the QT message boards for information on QT. I read many answers by Medwed which are very informative and the response was very fast too. In contrast, QT in the present form does not believe in message boards and support is through mail only, which is mainly in the one-to-one format. Still have to thank them for reatining it free where they do not provide service like in India. murthymsr |
|
#9
|
|||
|
|||
|
Quote:
Further to the email & Inspite of the clarification, link of which was provided by WL, from today morning onwards, my QT is NOT working to update stock data. Some consolation is that NIFTY is getting updated. Is it so with you also? May be we have to say 'GOOD Bye' to QT ![]() Thanks & regards. murthymsr |
| The Following User Says Thank You to murthymsr For This Useful Post: | ||
whyLately (22nd September 2009) | ||
|
#10
|
|||
|
|||
|
Quote:
Regards ken |
![]() |
| Bookmarks |
| Tags |
| paintbar, paintbars, quotetracker |
| Thread Tools | |
|
|
Indemnity, Disclaimer & Disclosure
Notice:
• By visiting Traderji.com you automatically indicate that you agree to our Forum Rules, Indemnity, Disclaimer & Disclosure Notice and General Content Disclaimer Notice and indemnify Traderji.com, its
associates and related parties of all claims howsoever resulting from
the usage of the forum/site.
• Disclaimer: Trading or investing in stocks & commodities
is a high risk activity. Any action you choose to take in the markets
is totally your own responsibility. You are recommended to make appropriate enquiries and seek appropriate advise before sending money, incurring any expenses, acting on recommendations or entering into any commitment in relation to any advertisement published here. Traderji.com does not vouch for any claims made by the advertisers of products and services. Traderji.com will not be held liable for any consequences in the event such claims are not honoured by the advertisers. Traderji.com will not be liable for
any, direct or indirect, consequential or incidental damages or loss arising out of the use of any information by anybody mentioned anywhere on this site.
• Disclosure: The information in this forum is neither an offer to sell nor solicitation to buy any of the securities mentioned herein.
The writers may or may not be trading in the securities mentioned.
• All names or products mentioned are trademarks or registered trademarks of their respective owners.
General Content Disclaimer Notice:
In light of our policy of encouraging candid, open exchanges of views and the rapid distribution of information originating from many sources, Traderji.com cannot determine the accuracy of information that may be uploaded to the forum. Opinions, advice and all other information expressed by participants in discussions are those of the author. You rely on such information at your own risk. You are urged to seek professional advice for specific, individual situations and not rely solely on advice or opinions given in the discussions. Since Traderji.com is an open and free discussion forum, any comments made by members of this forum in their posts reflect their own views and not of the owner or administrator of Traderji.com. Thus the owner/administrator indemnify themselves of all claims whatsoever and will not be liable or responsible for any members comments/views in this forum Traderji.com. If you find any objectionable or offensive posts made by members of this forum which you would like to bring to our notice for removal then please Contact Us.