Modification denied. Order is too close to market.

 
probably me being a bit dense but i get this message when i try to close orders in one of my metatrader accounts yet dont get it in others?? surely i can close my order at any point cant i??
 
iannai69:
probably me being a bit dense but i get this message when i try to close orders in one of my metatrader accounts yet dont get it in others?? surely i can close my order at any point cant i??

Yes, you can close your order, you close a Buy at Bid and a Sell at Ask . . . but the error is Modification denied . . .

If you aren't using return values and printing all the relevant information to the log you should be . . . read this: What are Function return values ? How do I use them ?

If you are, please copy and paste the relevant info from your log along with the code that caused the error.

 

thank you again, very helpful though I'm still working through the info regarding return values, i'll get there.

again, thanks.

 
iannai69: surely i can close my order at any point cant i??
No you can't, depending on your broker and how close the market is to your TP/SL.
MarketInfo(analyze.pair, MODE_STOPLEVEL)*Point
On IBFX that was 3 pips before they went to ECN.
 

ah, makes sense

Reason: