There are no mind readers here.
We can't believe you when you say 48 pips as you may not understand the a pip is not a point on a 3/5 digit broker.
Why didn't you post the actual prices, to full resolution, so we'd know you got the signs right? (Ask by itself isn't helpful.)
string PriceToStr(double p){ return( DoubleToStr(p, Digits) ); }
Why didn't you post the code, both the modify and your print statements, and the actual output? Summarizing isn't helpful as you may be hiding the truth by your misunderstanding.
WHRoeder thatnk you for your answer and your time. I fully understand that a pip might differ in size, that's why i use MarketInfo(Symbol(), MODE_TICKSIZE) and that's why i know that 48 pips is 0.48 in the GBPJPY which is the case at hand.
Here is the order modify code: OrderModify(trailticket,OrderOpenPrice(),Ask+trailminimumstoploss,OrderTakeProfit(),0,Yellow);
and this is my Print code in case of an error:Print("Selltrailing: Error in OrderModify. Error code= ",GetLastError(), ", SL-Ask= ",NormalizeDouble(OrderStopLoss(),Digits)-Ask, ", Stoplevel= ", MarketInfo(Symbol(), MODE_STOPLEVEL), ", Freezelevel= ", MarketInfo(Symbol(), MODE_FREEZELEVEL), "Orderstoploss= ", OrderStopLoss(), "Ask= ", Ask );
Ask by definition is double so I believe that the print function returns the Ask price in its full length.
WHRoeder thatnk you for your answer and your time. I fully understand that a pip might differ in size, that's why i use MarketInfo(Symbol(), MODE_TICKSIZE) and that's why i know that 48 pips is 0.48 in the GBPJPY which is the case at hand.
Here is the order modify code: OrderModify(trailticket,OrderOpenPrice(),Ask+trailminimumstoploss,OrderTakeProfit(),0,Yellow);
and this is my Print code in case of an error:Print("Selltrailing: Error in OrderModify. Error code= ",GetLastError(), ", SL-Ask= ",NormalizeDouble(OrderStopLoss(),Digits)-Ask, ", Stoplevel= ", MarketInfo(Symbol(), MODE_STOPLEVEL), ", Freezelevel= ", MarketInfo(Symbol(), MODE_FREEZELEVEL), "Orderstoploss= ", OrderStopLoss(), "Ask= ", Ask );
Ask by definition is double so I believe that the print function returns the Ask price in its full length.
- On currencies TICKSIZE is the same a Point and neither are the same as a pip on a 3/5 digit broker. On metals they can be different.
- 0.48 is 48 pips on JPY. Agreed and irrelevant. Why do we care about the current SL value being 48 pips higher? We still don't know weither you are on a 3/5 digit broker. Ask= 140.46 doesn't tell us since the price at that moment could have been 140.460 (3 digits.)
- SL-Ask is irrelevant to your problem, we need to know the NEW value (Ask+trailminimumstoploss.)
- trailminimumstoploss is meaningless. We need to know the value.
- Pre-build 600 Print output up to 4 digits not full length and you didn't haven't specified.
- Do NOT use NormalizeDouble, EVER. For ANY Reason. It's a kludge, don't use it. It's use is always wrong
same ordermodify: OrderModify(trailticket,OrderOpenPrice(),Ask+trailminimumstoploss,OrderTakeProfit(),0,Yellow);
printing code: Print("Selltrailing: Error in OrderModify. Error code= ",GetLastError(),"trailingminimumstoploss= ", trailminimumstoploss, ", Ask+ trailingminimumstoploss= ", Ask+trailminimumstoploss, ", Stoplevel= ", MarketInfo(Symbol(), MODE_STOPLEVEL), ", Freezelevel= ", MarketInfo(Symbol(), MODE_FREEZELEVEL), "Orderstoploss= ", OrderStopLoss(), "Ask= ", Ask );
output message in tester: 2014.03.01 20:47:22.953 2013.03.04 00:37 Gaptrading GBPJPY,H1: Selltrailing: Error in OrderModify. Error code= 145trailingminimumstoploss= 0.39, Ask+ trailingminimumstoploss= 140.85, Stoplevel= 10, Freezelevel= 10Orderstoploss= 140.94Ask= 140.46
I run the strategy tester as you wanted. I hope that this is more helpful!

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, while in strategy tester I Try to modify my stop loss and I get error 145 (short position). I can not explain the reason why because the Stoplevel is 10 pips, my TS is 39 pips and the SL-Ask=48 pips > than 10 (the stop level)
The position at hand is a short position!
2014.03.01 13:53:05.343 2013.03.04 00:37 Gaptrading GBPJPY,H1: OrderModify error 145
2014.03.01 13:53:05.343 2013.03.04 00:37 Gaptrading GBPJPY,H1: Selltrailing: Error in OrderModify. Error code= 145, SL-Ask= 0.48, Stoplevel= 10, Freezelevel= 10Orderstoploss= 140.94Ask= 140.46
Can anyone give a clue why is this happening?
Thnx