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 ?
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!
but if you tell us why u want the EA to goes everytim not just on tick maybe we can help ya better
The EA checks the opened orders and when the total of all opened orders reaches a certain amount, it closes the orders and opens new ones. This check must be performed continuously and not only every 15minutes when I'm on a M15 chart.
Then put the code in OnTick/Start and it will be called each tick. The timeframe of the chart is irrelevant.
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().
I don't know what to change,
As I said, the EA works fine with void Start() on my local computer. As soon as the amount is reached, the orders are cashed in. It's only when the EA runs on MT4 VPS that it only cashes in every 15 minutes when on M15 (if condition is still ok).
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
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.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.