(mql4 newbie)Help with my first indicator - chaging the range of the indicator's values when the time frame changes.
get the current period => https://docs.mql4.com/windows/Period
then define the range (if value is X, range = N) => https://docs.mql4.com/constants/timeframes
no?
get the current period => https://docs.mql4.com/windows/Period
then define the range (if value is X, range = N) => https://docs.mql4.com/constants/timeframes
no?
Thanks ricx for your fast reply.
As I understand, the value of "#property indicator_minimum/maximum" is determined at the beginning of the code and cannot be addressed in the the "int start() " section. I do not see how I can change the values of "#property indicator_minimum/maximum" after the initialization of the indicator.
Thanks ricx for your fast reply.
As I understand, the value of "#property indicator_minimum/maximum" is determined at the beginning of the code and cannot be addressed in the the "int start() " section. I do not see how I can change the values of "#property indicator_minimum/maximum" after the initialization of the indicator.
Thanks ricx for your fast reply.
As I understand, the value of "#property indicator_minimum/maximum" is determined at the beginning of the code and cannot be addressed in the the "int start() " section. I do not see how I can change the values of "#property indicator_minimum/maximum" after the initialization of the indicator.
OK - found a simple solution which made me feel quite stupid - I deleted the "#property indicator_minimum/maximum" lines. And now the range is automatically adjusted to the indicator's values range. I did not have to define the range at first.
Thanks again,
Yon.
- 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'm new to programming.
Just wrote my first Indicator and I have a problem.
The range of the indicator's values e change considerably when the time frames change.
So, I wish to find a way to set different range for each time frame.
I defined the range with "#property indicator_minimum" and "#property indicator_maximum"
How do I make the value of those properties change each time the user changes the time frame?
I know exactly which range values I want for each time frame.
Thanks,
Yon.