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

How to define an specific bar High or Low

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

    How to define an specific bar High or Low

    Hi,

    Is it possible, using the Strategy Wizard, to define a High or Low price from an specific bar.

    For example

    If Bid Price >= 09:00 Bar High then Buy at Market

    It is possible to define that "Time Bar High or Low"


    Thanks,
    Carlos

    #2
    Hello CarlosTTW,

    Thanks for opening the thread.

    Values in a Price Series like Open, High, Low and Close, can be referenced for previous bar values using a barsAgo index. It is possible to find a barsAgo index using a given time, but this would require unlocking the strategy and using custom programming.

    Some approaches that can be used in the Strategy Wizard would involve:
    1. Checking if the current bar time is 9:00AM and then save the High of that bar to a variable to use later
    2. Use a barsAgo reference for High to reference the High from 9:00AM. This would require knowing what data series you intend to apply the strategy to so you can enter the correct barsAgo reference.


    On a 15 minute data series, a barsAgo reference of 1 will represent the bar that closed fifteen minutes ago, a barsAgo reference of 2 would represent the bar that closed 30 minutes ago, etc.

    The Strategy Wizard tutorial demonstrates creating time checks and using variables in the Strategy Wizard. If you have not seen this tutorial yet, I highly recommend reviewing it for Strategy Wizard development.

    Strategy Wizard 301 - https://www.youtube.com/watch?v=FmBiNYsf1e8

    Please let us know if we can be of further assistance.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by cmtjoancolmenero, Yesterday, 03:58 PM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by benmarkal, Yesterday, 12:52 PM
    3 responses
    23 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by helpwanted, Today, 03:06 AM
    1 response
    20 views
    0 likes
    Last Post sarafuenonly123  
    Started by Brevo, Today, 01:45 AM
    0 responses
    11 views
    0 likes
    Last Post Brevo
    by Brevo
     
    Started by pvincent, 06-23-2022, 12:53 PM
    14 responses
    244 views
    0 likes
    Last Post Nyman
    by Nyman
     
    Working...
    X