ATR label at end of chart |
Post Reply |
Author | ||||
kneighbour
Regular Joined: 12 Feb 2005 Location: Australia Posts: 57 |
Post Options
Quote Reply
Topic: ATR label at end of chart Posted: 23 Feb 2005 at 6:34pm |
|||
I want to put a bit of information at the end of the chart - ie on the current price action. ATR * 2 (or some multiple) would do for a start. I looked at how you did the Ex-Dividend date thing, and tried to modify that. [target=Price] Unfortunatry this gives anexception error, although the syntax checks ok. I guess it is because I am trying to read a signal value, not just the last close. Something more like "ATR :" + ATR(Security.close,14); would seem to be the go - but this is not correct, of course. Any hints? |
||||
Peter
BullCharts Staff Joined: 09 Sep 2004 Location: Australia Posts: 241 |
Post Options Quote Reply Posted: 24 Feb 2005 at 11:08am | |||
This will do the trick:
[target=Price] [linestyle=text] [textalign=Above,Right] "ATR :" + ATR(14); if(barnumber=lastvalue(barnumber),C,undefined); A couple of things to note:
|
||||
kneighbour
Regular Joined: 12 Feb 2005 Location: Australia Posts: 57 |
Post Options Quote Reply Posted: 24 Feb 2005 at 8:13pm | |||
Ok - that works pretty good. Naturally enough, that is not all I want to do! Here is the current version ATRPeriod := input("ATR period",14,1,99); ATRMultiplier = input("ATR multiplier",2,1,10); [color = black] [target=Volume] [linestyle=text] [textalign=Above,Center] "ATR:" + Round((ATR(ATRPeriod) / ATRMultiplier),2);if (barnumber=lastvalue(barnumber),C,undefined);
Since the text is somewhat obtrusive on th emain price chart, I tried to put it on the Volume pane. It kind of works, but of course the scales are wrong. I can manually edit the properites to "Add new scale on left", but I do not see how to do this in code. The second idea is to put the text on two lines...ie ATR 0.21 Is there some way to do this? I do not see a linefeed character anywhere. In like vein - can I add more and more information to this indicator? ie have two or three lines of data of some sort. Can we put the information into the scale itself? ie the multi-color labels that appear in the price scale to mark the end of the charts.
|
||||
Tim Allen
BullCharts Staff Joined: 10 Sep 2004 Location: Australia Posts: 53 |
Post Options Quote Reply Posted: 25 Feb 2005 at 10:03am | |||
I bet that's because the 'location' value is still using 'Close' - if you plot the close value on the Volume scale, it's probably going to do something quite weird. If you make it use the Volume value instead (by changing the 'C' to a 'V' in the last line), I bet that will work much better.
You're right, there isn't a line-feed character, and so you can't force text onto multiple lines. I don't know whether Peter is likely to add a line-feed character - if we add too many text-formatting features we'll be basically rewriting Microsoft Word. ;)
I'm sure you can have as much data as you like by adding it to the end of the line that begins "ATR:" - with the caveat that it will stretch out horizontally.
I expect that's not currently possible - but even if it were, wouldn't it obscure the scale-markings? |
||||
kneighbour
Regular Joined: 12 Feb 2005 Location: Australia Posts: 57 |
Post Options Quote Reply Posted: 25 Feb 2005 at 5:19pm | |||
I expect that's not currently possible - but even if it were, wouldn't it obscure the scale-markings? [/QUOTE] Yes - which was to be the subject of another question - how can I turn off the indicator tags for a particular indicator? I can turn them ALL off or on, but it does not seem like I can turn off individual tags. The
|
||||
Post Reply |
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |