Firstly apologies for my simplistic coding error. A search of some other posts found some help regarding the error but not for my specific question and i have tried a few alternatives. What i want to do is place a buy stop, a specific number of pips away from the ask. Below is where i am at, but i an getting the "OrderSend error 4107".
extern double PriceBuffer = 25;
ticket=OrderSend(Symbol(),OP_BUYSTOP,lots,NormalizeDouble(Ask + PriceBuffer,Digits),slippage,NormalizeDouble(Ask - trailingStop,Digits),
NormalizeDouble(Ask + TakeProfit,Digits),"buy",magicNumber,0,Green);
Thanks in advance,
What do you think you get when you do this?
NormalizeDouble(Ask + PriceBuffer,Digits)
Thankyou both very much, i see what i was doing now. That was stupid, i have to probably set my price buffer to get it to ASK + 0.0025
@raptorUK - The trailing stop is variable that by default is set to 200 pips. I will have to also get the entry fixed so it removes 0.0200 instead of 200.