Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Combining trend and mean reversal in one strategy

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Combining trend and mean reversal in one strategy

    Hello guys,

    I am new here and I am a professional trader for 22 years now.
    You can imagine that programming is not a real strenght of mine so hopefully you can help me out


    I trade trend strategies on a daily chart with minute bars and entries/exits are on particular times for example entry at 8:30 am and exit 11:30 am.
    Now I would like to add an ATR that is calculating the ATR for 10 days every minute on that daily chart. When the ATR10 is reached and is outside the trend time interval (8:30 - 11:30) of the product I would like to trade mean reverting.

    All strategy calculation is volatility based and risk management too.


    I hope somebody can help me out and hopefully I can help you with some strategies.

    Regards

    Erik

    Last edited by ErikBaanstra; 04-03-2021, 11:39 AM.

    #2
    Hello Erik,

    Welcome to the NinjaTrader forums!

    Below is a link to a forum post with helpful information about getting started with NinjaScript and includes a link to the Strategy Builder 301 training video.


    If the Strategy is a strategy created with the Strategy Builder and the chart is a daily chart, the ATR indicator can be selected in the condition builder in the Indicators folder.

    In an unlocked script the call to the ATR would appear similar to:
    Code:
    if (Close[0] > ATR(10)[0])
    Volume can be found in the Strategy Builder in the Price section.
    In an unlocked script the Volume series would be used.


    Are you receiving any errors or are you stuck with any specific lines of code?
    Chelsea B.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by burtoninlondon, Today, 12:38 AM
    0 responses
    5 views
    0 likes
    Last Post burtoninlondon  
    Started by AaronKoRn, Yesterday, 09:49 PM
    0 responses
    14 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Yesterday, 08:42 PM
    0 responses
    11 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Yesterday, 07:51 PM
    0 responses
    13 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,983 views
    3 likes
    Last Post jhudas88  
    Working...
    X