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

Plot line from overnight data for the rest of the day.

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

    Plot line from overnight data for the rest of the day.

    Hi boffins;

    Got stumped with this one. I am trying to set a threshold at the highest reading of a sub-indicator (ravi) and plot it on the same sub-indicator for the rest of the day.
    If you download the indicator a threshold is supplied but is manually adjusted. I wish to automate this.
    The highest reading is to be taken from the indicator (ravi) during the period 16:30 to 02:00 , the threshold, a line / plot on the indicator, is then to be drawn / moved from yesterdays setting, to the new setting and remain there till a new setting the following day at 02:00 is calculated.

    I have written this long hand as:

    Plot Threshold = highest value of ravi from 16:30 to 02:00

    I have taken out the variable threshold and replaced it with - 'private IntSeries T_holdsetting;'
    then in the initialize - 'myIntSeries = new IntSeries(this);'
    then in the Onbarupdate I have called the 'double threshold = .....' and have been trying to work out the formula for calculating the threshold from the IntSeries for the required period !!

    Obviously unsuccessfully !!!

    Am I trying to make this more complicated than it needs be?

    Am I using the wrong command? Should it be a 'data series' how do i get it to just calculate from the required time to the required time (am trying to use 'ToTime' here but i am referencing a plot not a bar so the bar close value might not be the highest value).

    Help required please. times are EST, not that that's to relevant !

    #2
    Hi there, can you please post the complete code so we can get a better picture of what you're trying to do?
    AustinNinjaTrader Customer Service

    Comment


      #3
      Hi Austin; thanks for coming back to me so quickly. I am using the code for the 'ravi' indicator posted on this site.



      Ben.

      Comment


        #4
        Ben, I was referring to the code you've wrote to try and plot the overnight data. Can you please attach that as well? We are not able to write indicators for customers, but we can help them get going in the right direction once started.
        AustinNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by FrazMann, Today, 11:21 AM
        0 responses
        3 views
        0 likes
        Last Post FrazMann  
        Started by geddyisodin, Yesterday, 05:20 AM
        8 responses
        52 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cmtjoancolmenero, Yesterday, 03:58 PM
        10 responses
        36 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by DayTradingDEMON, Today, 09:28 AM
        4 responses
        24 views
        0 likes
        Last Post DayTradingDEMON  
        Started by George21, Today, 10:07 AM
        1 response
        20 views
        0 likes
        Last Post NinjaTrader_ChristopherJ  
        Working...
        X