how to plot a price curve and an indicator

Posted By: hola123

how to plot a price curve and an indicator - 04/04/20 18:47

Hi,

Is there an example of a script which plots the price curve say of the EURUSD and that also plots an indicator? I believe this would be a main function not a run function as I only need it to run once.

Ideally it would be as simple as specifying the security & the start and end dates. I'm not asking for the code (although great if it already exists) just an pointer to where or how to do this. My coding backing ground is mainly C# & Python.

Thanks
Posted By: AndrewAMD

Re: how to plot a price curve and an indicator - 04/04/20 22:06

In fact, you would need run() because run() iterates through your time series and your indicators.

Included with Zorro is the IndicatorTest script, which plots various indicators.

Further reading:
https://zorro-project.com/manual/en/scripts.htm
https://zorro-project.com/manual/en/ta.htm
https://zorro-project.com/manual/en/plot.htm
Posted By: hola123

Re: how to plot a price curve and an indicator - 04/05/20 19:46

Thanks for the links. Got something kinda working now.

Am I right in thinking that when you use the plot function like below by default it will plot the price curve? I think Zorro is great but still struggling on the coding side of things.

plot("Laguerre",Laguerre(Prices,0.3),NEW,Color);
Posted By: danatrader

Re: how to plot a price curve and an indicator - 04/05/20 21:02

plot("Laguerre",Laguerre(&Prices,0.3),0,BLUE);

Would plot it in the main chart, if it is the first plot command.
NEW creates a new chart, everything after is plottet in that new chart until there is a new new command.
© 2024 lite-C Forums