Results 1 to 5 of 5
 0 Attachment(s)    

Thread: Trailing stop/TP increment - Help please

  1. #1

    Question Trailing stop/TP increment - Help please

    I would like to know how I can locking in pips using the TrailingProfit, TrailingStop and TrailingStep.

    Ex.: My virtual TP is 300, but after the EA be +30pips, I want to lock it and start a TP increment of +10 pips, if the market moves against me before the next level of the profit, the ea will close the position always with +30.

    extern double TakeProfit=300;
    extern int TrailingProfit=30;//|----------------trailing stop after profit reached
    extern int TrailingStop=10;//|-----------------trailing stop
    extern int TrailingStep=01;//|-----------------trailing step

    Is it right?
    Last edited by szmvscla; 06-10-2009 at 12:09.

  2. #2

    Default

    Consider just moving your Stop Loss to above (or below if its a sell) the point at which your order was opened when in a plus 15 pip profit. That is the break even point. That way you ensure the Stop Loss will be tripped in a profit if the currency starts to go backwards.. This method works very good.

  3. #3

    Arrow

    Quote Originally Posted by BillR View Post
    Consider just moving your Stop Loss to above (or below if its a sell) the point at which your order was opened when in a plus 15 pip profit. That is the break even point. That way you ensure the Stop Loss will be tripped in a profit if the currency starts to go backwards.. This method works very good.
    Thanks for your suggestion, but I want to lock 30 pips and then start to lock 10 by 10... But if the market starts to move against the position after it be with +35(example), the EA has to close the position with at least 30 pips.

  4. #4

    Default

    Quote Originally Posted by szmvscla View Post
    Thanks for your suggestion, but I want to lock 30 pips and then start to lock 10 by 10... But if the market starts to move against the position after it be with +35(example), the EA has to close the position with at least 30 pips.
    There's another thread currently near the top of this section which should tell you pretty much how to do this. You will just need to adapt the code slightly.

    edit: Try this thread

  5. #5

    Wink

    Quote Originally Posted by jezzer1961 View Post
    There's another thread currently near the top of this section which should tell you pretty much how to do this. You will just need to adapt the code slightly.

    edit: Try this thread
    Thank you!

Similar Threads

  1. Trailing stop and Trailing profit
    By Luudt in forum MQL programming
    Replies: 0
    Last Post: 02-15-2016, 21:00
  2. Add a trailing stop
    By funyoo in forum MQL programming
    Replies: 18
    Last Post: 07-19-2015, 21:46
  3. Best Trailing Stop ???
    By JXBlack in forum MQL programming
    Replies: 1
    Last Post: 08-09-2010, 15:48
  4. Please Add Trailing Stop
    By micutzu in forum Ideas for expert advisors
    Replies: 2
    Last Post: 08-01-2010, 13:35
  5. Waddah Attar Win EA - with Trailing Stop & Stop Loss
    By dlhc in forum Scripts and other tools
    Replies: 0
    Last Post: 03-09-2010, 12:33

Tags for this Thread

how to, level, mql, pips, profit, programming, 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
  •