Hi,
Does anyone know why an EA behave differently based on MqlTick() position.
Is it mandatory to have MqlTick() declaration inside OnTick() ?
It's not mandatory, both cases are correct, i.e., you can declare price_info inside OnTick(), as you did at 2nd situation.
Can you share with us what is different in your case?
It's not mandatory, both cases are correct, i.e., you can declare price_info inside OnTick(), as you did at 2nd situation.
Can you share with us what is different in your case?
price_info value. Still trying to understand what is happening. I will let y know. Thank you
Once you declare the price_info function, values are not automatically assigned to it. You have to "copy" your data into your variable. You do this using another function: SymbolInfoTick( ).
If you declare your variable without copying values into it, so you will get no values (I didn't test it yet, but maybe you can also get incorrect values).
Are you still getting these "different" values even after using the SymbolInfoTick function? It would be interesting to know that, so we could help you ...
Once you declare the price_info function, values are not automatically assigned to it. You have to "copy" your data into your variable. You do this using another function: SymbolInfoTick( ).
If you declare your variable without copying values into it, so you will get no values (I didn't test it yet, but maybe you can also get incorrect values).
Are you still getting these "different" values even after using the SymbolInfoTick function? It would be interesting to know that, so we could help you ...
- 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,
Does anyone know why an EA behave differently based on MqlTick() position.
Is it mandatory to have MqlTick() declaration inside OnTick() ?