Hi,
I am trying to get the price the last time the RSI equaled a specific reading anyone know if there is an array storing the price at that reading?
For example I can use my own variable and say when 1 hour rsi=50, myvar=current price but if the app or computer gets turned off you lose those values. I want the price from the last time the 1h rsi equaled 50.
Thanks
Read up on Global Variables, then check out "GlobalVariableSet" and GlobalVariableGet
- docs.mql4.com
Read up on Global Variables, then check out "GlobalVariableSet" and GlobalVariableGet
Interesting, thanks mate
Hi,
I am trying to get the price the last time the RSI equaled a specific reading anyone know if there is an array storing the price at that reading?
For example I can use my own variable and say when 1 hour rsi=50, myvar=current price but if the app or computer gets turned off you lose those values. I want the price from the last time the 1h rsi equaled 50.
Thanks
You can try saving the data to a local file and remember save the file periodically.
No problem!
That's essentially what a Global Variable does, except the entire process is abstracted.Yah it is working great thanks Alex. I wanted to add to this thread for anyone who may read it later that if you run the bot in the tester app with the same global variable names you can get the back data and have those past values stored in your vars for your live bot to use as well.
You can try saving the data to a local file and remember save the file periodically.
Yah thanks Carlos. I was actually going to do this if there were no better suggestions. It is really annoying working with parsing flat files however so I thought I would just put the question out there and see if someone like Alex would suggest something easier/less work. :)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I am trying to get the price the last time the RSI equaled a specific reading anyone know if there is an array storing the price at that reading?
For example I can use my own variable and say when 1 hour rsi=50, myvar=current price but if the app or computer gets turned off you lose those values. I want the price from the last time the 1h rsi equaled 50.
Thanks