Forum

Backtest stoping to generate randomly

//+------------------------------------------------------------------+ //| Investtest.mq5 | //| Copyright 2024, MetaQuotes Ltd. | //| https://www.mql5.com |

Code working only on forex not on CFD

//+------------------------------------------------------------------+ //| Investtest.mq5 | //| Copyright 2024, MetaQuotes Ltd. | //| https://www.mql5.com |

Cannot use the position time

Hello, here's my file, it does work if i remove the position total and position get interger funtions but when i try to input them, it doesn't, can someone help me? #property copyright "Copyright 2024, MetaQuotes Ltd." #property link " https://www.mql5.com " #property version "1.00"

orders not closing

hi this code is not closing orders, could you help me to figure out why? void OnTick () { string signal= "" ; int PeriodMA = iMA ( _Symbol , PERIOD_H1 , 9 , 0 , MODE_SMA , PRICE_CLOSE , 0 ); int SlowMA = iMA ( _Symbol , PERIOD_H1 , 12 , 0 , MODE_EMA , PRICE_CLOSE , 0 ); int FastMA = iMA ( _Symbol

Orders not closing with order close signal

hi everyone, i don't understand why my positions oppen themselves and do not close, could you help me, thanks. ****