modify Problems in some symbols (Stoploss and TakeProfits Format i think)
modify Problems in some symbols (Stoploss and TakeProfits Format i think)
13 Aug 2019, 15:31
Hi! comunity... first of all thanks for all respond...
well I resucite and old code that says
double? newStopLoss= Symbol.Ask - 10*Symbol.PipSize; double? newTakeProfits= Symbol.Ask + 10 * Symbol.PipSize; ModifyPosition (position, Math.Round(Convert.ToDouble(newStopLoss), symbol.Digits), Math.Round(Convert.ToDouble(newTakeProfits), symbol.Digits));
so, few years ago i format newstoploss and newtakeprofits with a rounded symbol.digits, but that force to convert to double for math to work. with this code i receive and error of "technical error" in live account
i change code to normal modify
ModifyPosition (position, newStopLoss, newTakeProfits);
and now i receive error (only in some symbols): "Nothing to amend"
13/08/2019 12:20:29.835 | → Request to amend position PID96311600 (SL: 75.905) is REJECTED with error "Nothing to amend."
-------------------
can someone give me a post where stoploss/takeprofits format and limits are explained? and some code to format?
regards
software: calgo on windows 10
Replies
PanagiotisCharalampous
13 Aug 2019, 16:17
Hi ctid990337,
Thanks for posting in our forum. The message means that the values are identical with the previous ones. It would be better to check if the new stop loss and take profit are different from the existing ones before you try to modify them.
Best Regards,
Panagiotis
@PanagiotisCharalampous
ctid990337
13 Aug 2019, 18:56
thanks Panagiotis, and this one?
13/08/2019 13:15:13.151 | → Request to amend position PID96311612 (SL: 4.00000) is REJECTED with error "New SL for BUY position should be <= current BID price. current BID: 387431, SL: 400000; "
in the position info (sl: 4.00000 with a point) and in error (400000 with no point) something strange happend...
@ctid990337
PanagiotisCharalampous
14 Aug 2019, 08:51
Hi ctid990337,
The message is clear. You cannot place a stop loss higher than the bid price.
Best Regards,
Panagiotis
@PanagiotisCharalampous
ctid990337
13 Aug 2019, 15:47
where
this happen in symbol: PLNJPY.
thanks
@ctid990337