From int start (which returns value) to be void OnTick (which don't returns values)
You don't! OnTick is for EAs. Your code is an indicator.
Event Handling Functions - Functions - Language Basics - MQL4 Reference
How to do your lookbacks correctly.
You don't! OnTick is for EAs. Your code is an indicator.
thank you for clarifying, I understand that OnTick is for EA, Mainly I want to create EA from this indicator which coded by the old event handlers! so how can i use this indicator to build my EA ?
this indicator draw a custom 4 array moving averages , I want to create EA conditions related to this indicator to open orders !
i know how to code the conditions to open orders ! but i can't take any data from that code , that's why the EA is not working !You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forum
Just get the value(s) of the indicator(s) into the EA (using iCustom) and do what you want with it.
You should encapsulate your iCustom calls to make your code self-documenting.
Detailed explanation of iCustom - MQL4 programming forum
thank you :) I'll found out how to use iCustom :)
I have an old code MQL4 indicator, I want to use it to create EA but in new MQL4 language.
How to change this part of the code from int start() (which returns value) to be void OnTick (which don't returns values) ?