"are not executed" by itself is not very helpful.
Did you get any error messages?
WindmillMQL:
"are not executed" by itself is not very helpful.
Did you get any error messages?
Thx for you reply. I could figure it out, it was the allowed TP/SL values for the currency pair.
But anyway, thank you for taking your time!
void OnTick(){ //define as propriedades das médias int EMAFastDefinition = iMA (_Symbol,_Period,14,0,MODE_EMA,PRICE_CLOSE); int EMASlowDefinition = iMA (_Symbol,_Period,35,0,MODE_EMA,PRICE_CLOSE); ⋮ CopyBuffer(EMAFastDefinition,0,0,3,EMAFast); CopyBuffer(EMASlowDefinition,0,0,3,EMASlow);Perhaps you should read the manual, especially the examples. They all (including iCustom) return a handle (an int.) You get that in OnInit. In OnTick (after the indicator has updated its buffers,) you use the handle, shift and count to get the data.
Technical Indicators - Reference on algorithmic/automated trading language for MetaTrader 5
Timeseries and Indicators Access / CopyBuffer - Reference on algorithmic/automated trading language for MetaTrader 5
How to start with MQL5 - General - MQL5 programming forum - Page 3 #22 2020.03.08
How to call indicators in MQL5 - MQL5 Articles 12 March 2010
Also see my example for encapsulating calls
Detailed
explanation of iCustom - MQL4 programming forum
2017.05.23
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello everyone,
I am cracking my head here. My code simply does not execute the SL or TP orders. They appear on the testing graph, but they are not executed. Can anybody help, please? Thanks.