SET STOP pLOSS x pTRAILING y

Forums ProRealTime English forum ProOrder support SET STOP pLOSS x pTRAILING y

Viewing 4 posts - 1 through 4 (of 4 total)
  • #108906

    I want to understand better how pLOSS 200 becomes pTRAILING 30. Say my average position price is 500 (buy / long) with pLOSS 200 and pTRAILING 30. If I use both the stops together, can you please explain to me at what current price pLOSS 200 will become pTRAILING 30?

    Your definition in the manual is:

    SET STOP pLOSS x pTRAILING y: A stop loss is placed at x points from average position price and it becomes a trailing stop of y points if the trailing stop level become closer to current price than the stop loss level (this occurs price varies favorably by y points – x points)

    I’m assuming this means y points minus x points. In my example 30 minus 200 = -170

     

    #108909

    While the instruction “SET STOP pLOSS x pTRAILING y” is working in backtests, it cannot be used in a live trading environment.

    If you want to use a fixed STOP LOSS + a trailing stop, you should do the following:

    Set a fixed stop loss in your code with:

    For a trailing stop, use of the following codes snippets below (there are many other ones in forums and library):

    Complete trailing stop code function

    Trailing stop with the Max Favorable Excursion (MFE)

    useful link with many codes: https://docs.google.com/spreadsheets/d/1rgboqj7sVwsP9ZRhOduOefye48QMWC07jWVXCl-KJPU/edit#gid=0

     

     

    1 user thanked author for this post.
    #109190

    Thanks Nicholas

    SET STOP pTRAILING x

    Does above trailing stop code automatically reject any worse stop positions even if x is not set as a hard number but is set as a variable based on say value of ATR at previous close? So the stop level can only get better not worse as price and ATR (previous close) fluctuate over time?

    I want my initial stop to be 1.5 * ATR (previous close) e.g. = 200 points, when new candlestick opens and I enter into a position. However, I don’t want the trailing stop to remain 200 points away from current price. I want it to change as the ATR (previous close) changes when new candlesticks open but only if it becomes less than 200. So will it retain the key trailing stop function where the stop level changes favourably only as price fluctuates but also change favourably only the stop distance from the current price level as ATR (previous close) fluctuates?

    I hope it does and I don’t have to code it.

     

     

    #109228

    You can embed the instruction into a condition.

    But you should use pending stop order for your moving stop.

    When you set the order, put a pending stop order at close-1.5 * ATR (for a long order)

    Then, each time the price move favorably, use the new level for that stop order. But you’ll have to put the pending order continuously as long as your long order is on market.

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

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