Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Requesting code to take ATR at a specific time as a condition in the strategy builder

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

    Requesting code to take ATR at a specific time as a condition in the strategy builder

    Requesting help with ninjascript code. Want to experiment with using ATR at a certain time as a condition to determine whether to trade a session. This is beyond my ability. If someone could code it I would appreciate it.

    #2
    Hell jourdale,

    Thanks for your post.

    You would need to create a Time Comparison condition or Time Filter in the Strategy Builder to check if the current Time is within a certain timeframe. Then, you could create a condition in the same Set that compares the ATR indicator to a certain value.

    See this help guide pages linked below for more information about creating Time Comparisons and Time Filters in the Strategy Builder.

    Creating Time Comparisons: https://ninjatrader.com/support/help..._builder.htm#H owToCreateTimeComparisons
    Creating Time Filters: https://ninjatrader.com/support/help..._builder.htm#H owToCreateTimeFilters

    Here is a link to our publicly available training video, 'Automate your trading with NinjaTrader's Strategy Builder', which you might find helpful.

    'Automate your trading with NinjaTrader's Strategy Builder': https://youtu.be/VxU4FR6GWNA

    And, I am also linking you to the Educational Resources section of the Help Guide to help you get started with NinjaScript:
    https://ninjatrader.com/support/help..._resources.htm​​
    <span class="name">Brandon H.</span><span class="title">NinjaTrader Customer Service</span><iframe name="sig" id="sigFrame" src="/support/forum/core/clientscript/Signature/signature.php" frameborder="0" border="0" cellspacing="0" style="border-style: none;width: 100%; height: 120px;"></iframe>

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X