Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

EasyLanguage to NinjaScript

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

  • RobinT
    replied
    worked perfectly. Thanks again.

    Leave a comment:


  • RobinT
    replied
    after your suggetion I looked around and found Bars.GetHigh(barno) which should do the trick. Thanks.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    You can use other items like Bars.GetClose, Bars.GetOpen, etc.

    Leave a comment:


  • RobinT
    replied
    I am trying to get all the bars in the last trading day, so its the right most bar, ie close and the bar before that, all the way back to the open. I am trying to make a checksum so I can verify the data otherwise I will tell the user to do a Historical update.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello RobinT,

    Thank you for your post.

    Which bar's data are you trying to get? The current bar calling OnBarUpdate() or the right most bar on the chart (Count)?

    Leave a comment:


  • RobinT
    replied
    Can you tell me how to get bar data by bar number?

    This is all happening at bar 1 so i cant use barsago, or High[1].

    if ( BarsInProgress == 0 & CurrentBar == 1 )
    {
    I get the bar number

    dt = Bars.GetTime(Bars.Count-1) ;
    barno = Bars.GetBar(dt) ;

    so how do I get the bar data using barno ? High, Low ?

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello RobinT,

    We would not have any resources on automating the historical data import.

    Leave a comment:


  • RobinT
    replied
    is there a recommended way of loading data? If the chart is started in the middle of the trading day I have to use the last function otherwise I use historical manager. I am trying to do it with minimal user input which is why I cant use Historical manager.

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello RobinT,

    There would not be an native functions in the .DLL for buffer or memory management.

    Leave a comment:


  • RobinT
    replied
    Bars.GetTime(Bars.Count-1) - Thanks for that,

    it is my external application, and I am calling it every 50 ms ok, but if I remove the sleep (50) and pump in data at max speed say 5 data points per ms, it cant take it. Is there a buffer full test?

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Hello RobinT,

    You can use Bars.GetTime(Bars.Count-1) for the last bar on the chart.

    For the question on Last, are you referring to pulling this in your external application or in NinjaScript? How often are you pulling? When do you need it?

    Leave a comment:


  • RobinT
    replied
    Indicator, I feared that, will have to do in OnUpdate. Can you do it there? How?

    Also, is there a feedback from Last ? I am flooding the system with data and it seems I am loading it too quickly. If I put a Sleep (50) in after every data point it is ok, but I wondered if there was a buffer full indication?

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Originally posted by RobinT View Post
    How do I get the DateTime of the lastbaronchart during OnStartUp?
    Are you referring to a NinjaScript Object? Such as a Strategy or Indicator?

    OnStartUp() would not have the data loaded, so the last bar on the chart would not be accessible.

    Leave a comment:


  • RobinT
    replied
    How do I get the DateTime of the lastbaronchart during OnStartUp?

    Leave a comment:


  • NinjaTrader_PatrickH
    replied
    Originally posted by RobinT View Post
    When you are making a bar with Last () a five minute bar does not print until the first tick of the next bar arrives. Is there anyway you can close a bar or send a dummy value to open the nexxt bar?
    Hello RobinT,

    There would not be a means to pull the value until the tick to open the next bar is received.

    Leave a comment:

Latest Posts

Collapse

Topics Statistics Last Post
Started by kinfxhk, 07-14-2026, 09:39 AM
0 responses
129 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 10:18 AM
0 responses
105 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 09:50 AM
0 responses
87 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-13-2026, 07:21 AM
0 responses
106 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Started by kinfxhk, 07-11-2026, 02:11 AM
0 responses
86 views
0 likes
Last Post kinfxhk
by kinfxhk
 
Working...
X