Hi to all..
i would want to do a little observation..
often i saw this kind of code for implementing trailing stop:
if((NormalizeDouble(OrderStopLoss(),digits)<Normal izeDouble(Bid-point*(TrailingStop+TrailingStep),digits))||(Order StopLoss()==0))
OrderModify(OrderTicket(),OrderOpenPrice(),Normali zeDouble(Bid-point*TrailingStop,digits),OrderTakeProfit(),0,Blu e);
With SELL orders the code is dual (viceversa).
Of course this is only a part of a code and it's is not working so incomplete but my simple question is:
Why do you use ASK (and not BID) price for the first if statement?
If TrailingProfit is intended as the minimal goal to reach before moving the trailing stop,
this goal should be reached by the bid price that is the price at which i will close the buy position sooner or later,
instead, often i see that code (with first if statement referred to ASK price) in which trailing stop is moved anticipally without reaching the profit goal
(being ASK price always greater than bid price).
Of course the difference using BID or ASK is minimal because it corresponds to spread but mine is only a curiosity
about a formal-aesthetical and not practical question.
Of course somebody could object saying that the choice to use ASK price is due to a different point of view:
observing the new ASK price, it puts the focus on the movement of the ASK price that is just the previous open price:
in this way as trailing profit we intend the shift we wish the previous open price will do.
This is only a personal opinion, so if you think my vision is wrong tell it freely. I accept criticism.