Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Get Last Price inside of OnBarUpdate?

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

    #16
    Hello,

    Thanks for the update.

    We'll leave this thread as is in case any users run into anything similar.

    But nice stuff on the web service! If you want to create a separate thread on that specifically, please feel free to. We always encourage users helping users and sharing any information you have.

    Happy Holidays!
    MatthewNinjaTrader Product Management

    Comment


      #17
      Originally posted by webivation View Post
      i have sent him back a version to just do massive descriptive logging. my code (that was failing for him) does have some logic in it but it's pretty simple stuff.... a Property he sets as StartValue and then logic inside of OnBarUpdate() to only Log if Close[0] >= that value and <= (that value + 1)... he set it for the 1428 (meaning it would trigger when the price was greater than 1428 and less than 1429) and while it was still 1443 it logged saying it had hit 1428. In the full code I'm actually then calling a webservice at that point, however that's irrelevant to this behavior so I left it out... what was key is that it was getting a false value and giving a false start...

      I'll update you when he has installed and run the heavy logger version (logs close value, start range from start property, etc when it "triggers" int the logic), including log copies/etc.

      interesting behavior, it also is set with an end value, and set to trigger a "stop" at that value... it hit them simultaneously, making the think in 1 tick the value was wrong, and in another it was right (still being well above the end value which he had at like 1430 something).

      at first i questioned my logic, but i've been over it and over it and it's so simple there's just no room for it to be wrong, it's literally (isStarted is false until this is hit, then set to true... to prevent starting every tick while it's in the trade):
      What is the data feed? In a very fast instrument, an aggregated feed will behave very differently from a raw feed, especially if there is also a wide bid/ask spread.

      Comment


        #18
        ok... it's back. and this time it won't seem to go away. happening on both live and simulated feed. same code i gave you. and only on his machine (as you saw it worked fine on yours, and it works fine on mine else i'd never have deployed to his). restarted, closed out and made a new workspace, etc. all no luck.

        i sent myself all of his logs/traces/db/etc while i was logged into his machine, is there a good way other than an attachment to get these to you without having to get back into his system over a remote connection?

        tried looking at them myself but can't make heads or tails of the trace info.

        Comment


          #19
          Hello webivation,
          To assist you further may I know:
          • What session template you are using.
          • What settings you are using to initialize the strategy as per per you post #13


          I look forward to assisting you further.
          JoydeepNinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          612 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          355 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          561 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          564 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X