Need to remove the Stop-Loss feature from the attached mql script..
Slowpoison:
Hello,
Can someone only disable / remove the stop-loss feature on this script. I need the stop-loss disabled on this script as its interfering with another EA that manages my stop-loss.
//#property show_inputs //#property show_confirm extern double Lots = 0.01; extern int Slippage = 1; extern int Stop_Loss = 0; extern int Take_Profit = 0; //+------------------------------------------------------------------+ //| script "Open a new Buy Order" | //+------------------------------------------------------------------+ int start() { double Price = WindowPriceOnDropped(); bool result; int cmd,total,error,slippage; //---- int NrOfDigits = MarketInfo(Symbol(),MODE_DIGITS); // Nr. of decimals used by Symbol int PipAdjust; // Pips multiplier for value adjustment if(NrOfDigits == 5 || NrOfDigits == 3) // If decimals = 5 or 3 PipAdjust = 10; // Multiply pips by 10 else if(NrOfDigits == 4 || NrOfDigits == 2) // If digits = 4 or 3 (normal) PipAdjust = 1; //---- slippage = Slippage * PipAdjust; double stop_loss = Stop_Loss==0.0?0.0:Price - Stop_Loss * Point * PipAdjust; double take_profit = Take_Profit==0.0?0.0:Price + Take_Profit * Point * PipAdjust; if(Ask > Price) { result = OrderSend(Symbol(),OP_BUYLIMIT,Lots,Price,slippage,stop_loss,take_profit,"",0,0,CLR_NONE); } if(Ask < Price) { result = OrderSend(Symbol(),OP_BUYSTOP,Lots,Price,slippage,stop_loss,take_profit,"",0,0,CLR_NONE); } //---- return(0); } //+------------------------------------------------------------------+
You need to specify it in the input parameters
nicholishen:
You need to specify it in the input parameters
Yep got it thanks a ton Nicholishen, didn't look at the extra 0.0 you put there :p
You need to specify it in the input parameters
Hello,
Can someone only disable / remove the stop-loss feature on this script. I need the stop-loss disabled on this script as its interfering with another EA that manages my stop-loss.