OrderModify(OrderTicket(), 0,newSP, 0, 0, 0)OrderOpenPrice is set to zero... this is something you can't probably do... that's why you have error - trading not allowed...
try
OrderModify(OrderTicket(), OrderOpenPrice(),newSP, 0, 0, 0)
hope this is the error!
zolero
Hi, I'm having trouble creating a script that will change the stop loss of my orders. I keep getting error number 4109. Here is the part of the script that is giving me trouble.
I hope someone can point out my mistake.
Hi,
Unfortunately I can't help you fix yours but I found a great little very reasonably priced and flexible and effective commercial utility that has a 2 stage Trailing Stop Loss (TSL) that you can use either on its own or in conjunction with other AEs (it overrides the TSL in other AEs). It is from PipBoxer.Com: look for PBTS. Like all TSL, you have to have a profit that is equal to or greater than the amount of your TSL before it kicks in. Being a commercial product it is only available in compiled format of course.
Good luck with it.
…………………(8 >) Prosperous Trading (< 8)
DougRH4x
.
PS: I’m looking for someone to splice an adjustable (Trailing &) Stop Loss into the Martingale based program: PipMaker. Overcoming this one downfall of this program will make it VERY profitable!
Hi,
Unfortunately I can't help you fix yours but I found a great little very reasonably priced and flexible and effective commercial utility that has a 2 stage Trailing Stop Loss (TSL) that you can use either on its own or in conjunction with other AEs (it overrides the TSL in other AEs). It is from PipBoxer.Com: look for PBTS. Like all TSL, you have to have a profit that is equal to or greater than the amount of your TSL before it kicks in. Being a commercial product it is only available in compiled format of course.
Good luck with it.
…………………(8 >) Prosperous Trading (< 8)
DougRH4x
.
PS: I’m looking for someone to splice an adjustable (Trailing &) Stop Loss into the Martingale based program: PipMaker. Overcoming this one downfall of this program will make it VERY profitable!
}else if(OrderType() == OP_SELL) { newSP = Bid+(Point * 30);
For sells, stops are relative to the ASK.
Also you should auto adjust pips (30) for 5 digit brokers, TP, SL, and slippage
//++++ These are adjusted for 5 digit brokers. double pips2points, // slippage 3 pips 3=points 30=points pips2dbl; // Stoploss 15 pips 0.0015 0.00150 int Digits.pips; // DoubleToStr(dbl/pips2dbl, Digits.pips) int init(){ if (Digits == 5 || Digits == 3){ // Adjust for five (5) digit brokers. pips2dbl = Point*10; pips2points = 10; Digits.pips = 1; } else { pips2dbl = Point; pips2points = 1; Digits.pips = 0; } // OrderSend(... Slippage.Pips * pips2points, Bid - StopLossPips * pips2dbl
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I hope someone can point out my mistake.