Move to Breakeven...
Results 1 to 3 of 3

Thread: Move to Breakeven...

  1. #1
    This is my bit of code for transferring the stoploss to breakeven after a certain profit. Can there be anything wrong with it?

    Inserted Code //MoveOnce if(MoveStopOnce MoveStopWhenPrice gt; 0) if(Bid - OrderOpenPrice() == Point * MoveStopWhenPrice) OrderModify(OrderTicket(),OrderOpenPrice(), Bid - Point * MoveStopTo, OrderTakeProfit(), 0, Red); if (! EachTickMode) BarCount = Bars; last;

  2. #2
    Hello,

    Do not you have to use two sections for Short and Long entries?

    Of course, you may even use for setting BE (I am not certain how accurate the OrderProfit() is). Just something to take into account.

    PHP Code: <code><span style=”color: #000000”> <span style=”color: #0000BB”></span><span style=”color: #007700”>if(</span><span style=”color: #0000BB”>MoveStopOnce</span><span style=”color: #007700”></span><span style=”color: #0000BB”>MoveStopWhenPrice</span><span style=”color: #007700”>gt;</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”></span><span style=”color: #0000BB”>OrderProfit</span><span style=”color: #007700”>()gt;=</span><span style=”color: #0000BB”>MoveStopWhenPrice</span><span style=”color: #007700”>)
    </span><span style=”color: #0000BB”>OrderModify</span><span style=”color: #007700”>(</span><span style=”color: #0000BB”>OrderTicket</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderOpenPrice</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderOpenPrice</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>OrderTakeProfit</span><span style=”color: #007700”>(),</span><span style=”color: #0000BB”>0</span><span style=”color: #007700”>,</span><span style=”color: #0000BB”>Crimson </span><span style=”color: #007700”>);
    </span><span style=”color: #0000BB”></span> </span> </code>

  3. #3
    This particular system I am working on only copes with longs for the time being. Shorts require a entry strategy.

    A more accurate title for this thread would probably be MoveStopOnce but I believe I understand how the code works, it seems pretty like your example.

    Thanks for the help.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners more information