Trailing Step Function – script MetaTrader 4

Trailing Step Function - script for MetaTrader 4
//+——————————————————————+ //|                                                                  | //+——————————————————————+ void TrailingStep(double trailingStepStartPips, double _trailingStepPips, double initialStopLossInPips=0, bool useSymbol=false, bool useMagicNumber=false, int _magicNumber=0, bool initialStopLossWillBeDone=true) {     for(int i=OrdersTotal()-1; i>=0; i–) {         if(OrderSelect(i,SELECT_BY_POS)) {             bool magic = (useMagicNumber) ? (OrderMagicNumber()==_magicNumber) : true;             bool symbol = (useSymbol) ? (OrderSymbol()==Symbol()) : true;             if(!magic || !symbol) continue;             if(OrderType() == OP_BUY) {                 if(OrderStopLoss() >= NormalizeDouble(OrderOpenPrice() + initialStopLossInPips*_Point*10,_Digits)

RSI_MAonRSI_Filling Step EA – EA MetaTrader 5

RSI_MAonRSI_Filling Step EA
Trading strategy The EA uses a custom indicator RSI_MAonRSI_Filling – the signal is the intersection of two indicator lines. The indicator is created on the specified timeframe ‘Working timeframe‘ – the same timeframe is used to determine the moment of the birth of a new bar (if it is necessary for the parameters ‘Trailing on …‘