Forum

Calculate the stop loss at the close of the candle

I try to use the strategy tester to know if the strategy works or not, but I would like to calculate the stoploss at the close of the candle in which the stoploss was activated and not the stoploss of the operation that was created, does anyone have an idea of how do it ? #include <Trade/Trade.mqh>

Invalid stops

I'm new to mql5, I don't know why it gives me an error, [ invalid stops ], it's a simple EA you must open a buy trade according to the condition and sell on stop loss or sell all trades on the next candle. I am thankful for any kind of help.... #include <Trade/Trade.mqh> CTrade trade; ulong