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 AaronKoRn, Today, 09:49 PM
    0 responses
    6 views
    0 likes
    Last Post AaronKoRn  
    Started by carnitron, Today, 08:42 PM
    0 responses
    8 views
    0 likes
    Last Post carnitron  
    Started by strategist007, Today, 07:51 PM
    0 responses
    9 views
    0 likes
    Last Post strategist007  
    Started by StockTrader88, 03-06-2021, 08:58 AM
    44 responses
    3,975 views
    3 likes
    Last Post jhudas88  
    Started by rbeckmann05, Today, 06:48 PM
    0 responses
    9 views
    0 likes
    Last Post rbeckmann05  
    Working...
    X