Average True Range to create Stops

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #206805 quote
    danmsea
    Participant
    New

    Hello,

     

    I’m new to this. The strategy I want to backtest through automatic trading is fairly simple. I want to know how to set up a stop loss which is 2x the average true range reading of the entry candle.

    For example, when the 10 EMA crosses over the 150EMA, and at the candle close, the ATR reading is 8. I would like a stop loss of 16 points under the entry.

    I’m not sure if this is simple or not but if someone could help me that would be great.

    Thanks

     

    Dan

    #206813 quote
    robertogozzi
    Moderator
    Master

    There you go:

    IF MyLongConditions THEN
       MyATR = AverageTrueRange[14](close)
       BUY AT MARKET
       SET STOP LOSS MyATR * 2
    ENDIF
    danmsea thanked this post
    #206835 quote
    danmsea
    Participant
    New

    Legend thanks!

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Average True Range to create Stops


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
danmsea @danmsea Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by danmsea
3 years, 1 month ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 01/04/2023
Status: Active
Attachments: No files
Logo Logo
Loading...