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 alifarahani, Today, 09:40 AM
    2 responses
    12 views
    0 likes
    Last Post alifarahani  
    Started by junkone, Today, 11:37 AM
    3 responses
    15 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by pickmyonlineclass, Today, 12:23 PM
    0 responses
    1 view
    0 likes
    Last Post pickmyonlineclass  
    Started by frankthearm, Yesterday, 09:08 AM
    12 responses
    44 views
    0 likes
    Last Post NinjaTrader_Clayton  
    Started by quantismo, 04-17-2024, 05:13 PM
    5 responses
    35 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Working...
    X