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 rhyminkevin, Today, 04:58 PM
    3 responses
    46 views
    0 likes
    Last Post Anfedport  
    Started by iceman2018, Today, 05:07 PM
    0 responses
    5 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    7 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    50 views
    0 likes
    Last Post futtrader  
    Working...
    X