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 GussJ, 03-04-2020, 03:11 PM
        11 responses
        3,227 views
        0 likes
        Last Post xiinteractive  
        Started by andrewtrades, Today, 04:57 PM
        1 response
        13 views
        0 likes
        Last Post NinjaTrader_Manfred  
        Started by chbruno, Today, 04:10 PM
        0 responses
        7 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Started by josh18955, 03-25-2023, 11:16 AM
        6 responses
        440 views
        0 likes
        Last Post Delerium  
        Started by FAQtrader, Today, 03:35 PM
        0 responses
        11 views
        0 likes
        Last Post FAQtrader  
        Working...
        X