I want to create a button that essentially looks like a fibonacci retracement from the ATH to ATL with a 25%,50% and 75% retracement.
This way the ATR will adjust as price moves higher and i wont have to keep moving the retracement tool.
The code above is not correct, i can get it to draw a single line (the 50%) but when i add the code for the second it says it’s invalid.
Is there a link i need to add or another way or writing this so it works?
Also the line is a basic line and i’d like to add the percentage value to it if possible but i couldn’t find any information on how to do that.
Thank you both for the incredible information and assistance. I had tried the plots but could not for the life of me get them to work!.
It’s all working well now and i feel a lot more confident writing all the scripts i want to create.
Actually just a follow up to the previous post. Is there a way to add labels to the chart for the final plot calculation?
If there is a training package i could read that would be much appreciated.
The only way I know of labelling the plots is to use the TEXT tool and apply the label to the chart near the plot. Unfortunately, if the PLOT moves the TEXT tool will not move with it.
By the way, I made a couple of typos in the script I posted above (me confusing scripting with Optuma Pascal):
"color" should be "colour", and
"plor2" should be "plot2"
Also I've used ":="(which works) in lieu of "=". That's also a carryover from my working in Optuma Pascal.
Hey guys - as well as the text box you can enable the Show in Price Scale property of the Show Plot tool:
Note you can save the formula as an indicator and add it to your toolbox, and Save Settings as Default under Actions so that the value will always show.
Thanks again Trevor, yeah i figured out the errors and got it working, much appreciated.
Thanks for the information Darren, i found that cluttered up the side bar a lot so have just decided to add a caption instead to click and get the info.