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

Previous Days Bar High Ahead Of Price?

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

    Previous Days Bar High Ahead Of Price?

    Would it be possible to code a script to plot the previous days high which is ahead of the current price for the day you are trading?

    I am not talking about yesterday, but rather when you look to the left of the chart the day's range that the current days price is within at the time and the high of that specific day plotted on the current day...

    Thanks for any help!
    R.T.

    #2
    Hello,

    Thanks for the forum post.

    This would be possible if you created an indicator that outputted these values your interested in for the next bar on the current bar. Then use the following displace feature inside of ninjatrader to move the output one bar to the right.

    This is a paramter called displacement in the indicator parameters located in Right click->indicators menu.

    Let me know if I can be of further assistance.

    Comment


      #3
      Use an unterminated loop (while loop or do loop), or a large for loop, and get DayBars. examine each DayBar to see if the high is above current price and the low below current price, and break if true. You now have the correct day bar in your loop counter, so you can draw whatever you want dependent on its properties.

      ref: http://www.ninjatrader.com/support/h...?getdaybar.htm

      Comment


        #4
        Thanks for the help!

        So Koganam, you are saying that through the method you described that you can create the condition for the indicator? In other words, once that condition is set the way you described it will automatically look back (be it one previous days high that meets the requirement or 15 day bars back) and create the plot on the current day?

        I think this idea could be of great use to all day traders, if anyone is interested in taking it on, if costs are involved feel free to let me know...

        I have a few ideas for it beyond this part...

        I know this is out of my realm, just want to know if it is possible so I can see if someone will create it....

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by bortz, 11-06-2023, 08:04 AM
        47 responses
        1,609 views
        0 likes
        Last Post aligator  
        Started by jaybedreamin, Today, 05:56 PM
        0 responses
        9 views
        0 likes
        Last Post jaybedreamin  
        Started by DJ888, 04-16-2024, 06:09 PM
        6 responses
        19 views
        0 likes
        Last Post DJ888
        by DJ888
         
        Started by Jon17, Today, 04:33 PM
        0 responses
        6 views
        0 likes
        Last Post Jon17
        by Jon17
         
        Started by Javierw.ok, Today, 04:12 PM
        0 responses
        16 views
        0 likes
        Last Post Javierw.ok  
        Working...
        X