Trailing Stop with steps

Forums ProRealTime English forum ProOrder support Trailing Stop with steps

Viewing 6 posts - 1 through 6 (of 6 total)
  • #255000

    Hi all,

    I have two related questions about stop-loss and trailing stops in ProRealTime:

    1. Does ProRealTime have any plans to add “steps” to the default stop-loss and trailing stop features?
      For example, a trailing stop that moves only after the price has moved a certain number of points (a step), so that every time it moves X points it steps up by X points.
    2. In the meantime, does anyone know how to write ProRealTime code so that whenever there is an open position, the stop code is automatically applied to it — even if the position was opened manually?
      I’ve tried using some example code from this website, but in that code a Buy/Sell command needs to be part of the code, which means that if I open a position manually, the trailing stop doesn’t apply.

    What I want is something like this:

    • A “trailing stop” with a 100-point step, but not constantly trailing — only one movement.
    • In other words, as soon as the position is X points in profit (e.g., 100 points), the stop moves to break-even and then stays there.

    So if the market moves 100 points in my favour, the stop automatically moves to break-even and then stays there (no further trailing).

    If anyone has code for this — or knows how to implement it in ProRealTime — I’d really appreciate your help.

    Thanks!

    #255002
    1.  The native PRT Stop Loss does move by 1 point (for 1 point profit) after exceeding, for example, 100 as: Set Stop pTrailing 100.
    2.  See next post.

    Anybody wanting to do a more comprehensive answer, please feel free.

    #255003

    Credit / Thanks for below goes to @JS

     

     

    2 users thanked author for this post.
    #255012

    Here you have another example:

    2 users thanked author for this post.
    #255037

    Thanks, where should I copy this code? When I create a new startegy system with this code it says I need at least one instruction to enter the market.

    I want to enter the market then change the native PRT stop loss to move by 100 points instead of 1 point. It is like IG platform trailing stop where you can set Step to 100

    #255038

    I just figured out how to adjust the step to 100. After entering market with trailing stop , click on the stop and in the modify section you can adjust the steps.

    1 user thanked author for this post.
Viewing 6 posts - 1 through 6 (of 6 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login