Dear Nico
To my knowledge it is not possible, if u use void Start() then it is converted automatically to OnTick since its an EA! Only scripts uses OnStart and EA use OnTick!
https://docs.mql4.com/basis/function/events
but if you tell us why u want the EA to goes everytim not just on tick maybe we can help ya better
Onarius
- docs.mql4.com
Then put the code in OnTick/Start and it will be called each tick. The timeframe of the chart is irrelevant.
I have a EA that uses void Start () and runs ok on local desktop. It only goes round on every tick if placed on a VPS.
I tried replacing void Start with void OnStart() but the problem stays the same.
What should I use instead of void Start() and void OnStart() to have my EA go arround permanently and not only at every tick ?
OnStart is only for scripts. Not for EAs or indicators. For EAs use OnTick or start. For indicators use OnCalculate or start.
You don't have to do anything "continuously." Nothing is changing until a new tick arrives. Return and wait for the next tick.
There is no void start().
- There is no void Start() There is a int start() and int OnTick()
- local or VPS is the same, start runs once per tick.
- Then that is how it is coded, to look for a new bar. Change your code.
Start is deprecated, OnTick() function is instead. But... what do you mean EA go around permantently not at every tick... your EA is running orders or not depending the tick volume and what is set in your EA as variables and functions
My mistake,
Sorry for that but yes, the EA runs arround on every Tick and not permanently as I thougth.
Thank you all for taking the time to help me out.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
I have a EA that uses void Start () and runs ok on local desktop. It only goes round on every tick if placed on a VPS.
I tried replacing void Start with void OnStart() but the problem stays the same.
What should I use instead of void Start() and void OnStart() to have my EA go arround permanently and not only at every tick ?