Trailing stop and Trailing profit
Results 1 to 1 of 1
 0 Attachment(s)    

Thread: Trailing stop and Trailing profit

  1. #1
    Junior Member
    Join Date
    Feb 2016

    Question Trailing stop and Trailing profit

    Hi to all..

    i would want to do a little observation..

    often i saw this kind of code for implementing trailing stop:

    if(TrailingStop>0&&Ask>NormalizeDouble(OrderOpenPr ice()+TrailingProfit*point,digits))
    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.

    Best regards.
    Last edited by Luudt; 02-15-2016 at 20:16.

Similar Threads

  1. Add a trailing stop
    By funyoo in forum MQL programming
    Replies: 18
    Last Post: 07-19-2015, 20:46
  2. Trailing stop
    By painofhell in forum Trading discussion
    Replies: 1
    Last Post: 11-07-2014, 16:43
  3. ADX EA with trailing stop
    By TMC in forum Ideas for expert advisors
    Replies: 0
    Last Post: 01-11-2012, 22:29
  4. Waddah Attar Win EA - with Trailing Stop & Stop Loss
    By dlhc in forum Scripts and other tools
    Replies: 0
    Last Post: 03-09-2010, 11:33
  5. EA Trailing Stop
    By andrewte in forum MQL programming
    Replies: 1
    Last Post: 06-15-2009, 19:22

Tags for this Thread

profit, simple, spread, stop, trailing, trailingprofit, trailingstep, trailingstop

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Trailing stop and Trailing profit