Stop and Take Profit Multiple of ATR

Forums ProRealTime English forum ProBuilder support Stop and Take Profit Multiple of ATR

Viewing 13 posts - 1 through 13 (of 13 total)
  • #10456

    Hi,

    I”ve spent some considerable time trying to set ONCE a profit and Take profit as a multiple of say an ATR(14) but without success. The code runs without error but doesn’t do anything. Can you help please?

     

    #10460

    You should compute them like this, without making any conversion to POINTS and set them as decimal values, not price ones:

    and use these instructions to set them:

    Without the “P” which is made to set POINTS/PIPS stoploss and takeprofit

    If you are using the strategy on EURUSD for example, you should expect St and Tp to be : 0.0016 , and that’s the kind of value that LOSS and PROFIT need.

    #10467

    Thanks for looking at this Nicolas, however, neither the stops nor take profits are working on the DAX. e.g. on the tester a buy entry at 9:30, yesterday, was made at 9930.3. By 11:50 this was in profit of 72.5 points it was finally closed at 20:50 at 9943.8. Not sure which ATR the program will use but the entry bar was 15.30219 and the previous ATR 16.4528.

    Not sure what actually closed the trade as the stochastic crossed under 75  four times before closing the trade.

    I enclose my revised code for reference would appreciate your consideration.

     

    #10471

    On DAX, please try using PLOSS and PPROFIT instead.

    #10472

    Hi Nicolas,

    Same result I’m afraid. Any other suggestions please?

    John

    #10477

    Lines 69 and 70 should be at the end of code, not above your last endif.

    #10563

    Hi Nicolas, been away for a couple of days but when I make this change I get the message

    Syntax error line 72 character 1

    So any other ideas please?

    John

    #10570

    I have not tested your code, but I think that it should end like this:

    Make sure that any IF are correctly ended with an ENDIF.

     

    #10584

    Thanks Nicolas found an if without an endif

    #203747

    Hi everybody,

     

     

    I hope you will appreciate this TV script : https://www.tradingview.com/script/ofwFdl2A-stoch-supertrd-atr-200ma/

    It features:

    – ATR StopLoss using the price + an ATR multiplier

    -ATR TakeProfit using the price + the same ATR mult * 2  so it creates a 1:2  Risk/Reward

    – a trade breakeaven stop

    The sl/tp are fixed once the trade is launched and do not look to update along the trade.

    All these gives a better maxDD, specially the breakeven feature.

     

    Cheers 🙂

    #203763

    I reckon you should open a new / separate Topic and post the full script off Trading View and see if some kind soul might convert to PRT for you / us? 🙂

    #203771

    Hi GraHal 🙂

     

    I’ll try to remember to do so within the week but first I will give it a tr by my self maybe I can do it 😀

     

     

    Have a nice week

    1 user thanked author for this post.
    #203878

    Hi again

     

     

    There you are:

    https://www.prorealcode.com/topic/atr-take-profit-stop-breakeven/

     

     

    Kind Regards

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

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