Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator updates

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

    Indicator updates


    Hi,

    I trade a JPY currency pair whereby one of my
    strategies is to "TAKE LONG" when pair breaks
    "Previous Day High". The NinjaScript is working fine
    except that the Previous OHLC doesn't update on the
    charts. (if it's after 12:00AM, I have to log-off and
    start a new chart to get the previuous OHLC to update)

    Is there a scripting method to do some sort of
    "hard-refresh" so that the Previous OHLC will update
    when 12:00AM arrives?

    thanks,
    Steve D.

    #2
    imported post

    Hi Steve,

    I don't think the problem is that the indicator is not updating, if it was not you would not see any lines in the current (new day) for this indicator. Must be a logic issue. I looked at the code and I can't see any logic flaw so I will have to run a test on it.

    Will get back to you after further investigation.

    Ray
    RayNinjaTrader Customer Service

    Comment


      #3
      imported post

      Thanks for the note Ray. I've tested this on 2 machines. The first machine I keep on thru midnight (close of day) and the Previous High just keep going across horizontally at the same position on x-axis. (So since this is after midnight, it's really giving you the previous "day-before yesterday high"if you know what I mean. I re-logged in with second machine at 12:30 AM and the previous high is updated to reflect the true previous high.



      -Steve d.

      Comment


        #4
        imported post

        Right, which is the strange thing since once 12:00 is crossed, there isa reset logic for the new day. Either case, my development team will look into this.

        Can you confirm that this occurs on the latest Beta 9 build?

        Ray
        RayNinjaTrader Customer Service

        Comment


          #5
          imported post

          Hi Ray,



          Yes, I reset my time zones to make "now" midnight on the charts and yes, it occurs on both the Beta 8 and Beta 9 build. When I start a new chart at 12:07AM,previous OHLC is updated. Is there a way to programatically say "OK, it's 12 AM recalculate Previous OHLC" without manually closing chart?



          Thanks,

          Steve D.

          Comment


            #6
            imported post

            Steve,

            I can't reproduce it here. Works as expected. As soon as midnight rollsover, the opening bar of the new calendar day sets the new Prior OHLC values. What chart interval are you using?

            Ray
            RayNinjaTrader Customer Service

            Comment


              #7
              imported post

              Steve,

              I was able to reproduce it. Please try this indicator and let me know if it resolves it.

              Save an unzip the attached file in My Documents\NinjaTrader 6\bin\Custom\indicator
              Via NT Tools > Edit NinjaScript > Indicator, open any file
              Within the editor that opens, press F5, this will copmile the new indicator.
              Attached Files
              RayNinjaTrader Customer Service

              Comment


                #8
                imported post

                Hi Ray,

                I'm on a 5 minute interval. Ref: the zip file that you sent... this "PriorDayOHLC.cs" overwrites the old one, correct?

                I'm not having any luck with the new file. What time interval did you use?



                -steve d.

                Comment


                  #9
                  imported post

                  Yes, overwrites the previous one.

                  I used tick charts and second charts.
                  RayNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  50 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  126 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  69 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  42 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  46 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X