Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Cannot Reference to the Ask Data

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

    Cannot Reference to the Ask Data

    I am able to download the ask bid data from esignal.
    I can plot them in the chart (see the screen shot green is ask, red is bid, black is last)
    But when I reference my ask data in my indicator,
    Add(Instrument.FullName, PeriodType.Tick,1,MarketDataType.Ask);

    and

    Plot0.Set(Closes[1][0]);

    I can't see it. (see the second screenshot)

    but if I plot the trade data:

    Plot0.Set(Closes[0][0]);

    I can see it ( see the first screenshot)

    so the problem is Closes[1][0] and Closes[0][0]

    Is it a bug?
    Attached Files

    #2
    Update:
    I changed the code to plot the "last" type instead of "ask" type. :
    Add(Instrument.FullName, PeriodType.Tick,1,MarketDataType.Last);
    All indicator value still zero. It seems it is not the problem of ask type but the problem of closes[1] not working.

    Comment


      #3
      Any errors you would see in your Control Center log tab?

      Do you have a CurrentBars check for all involved / ADDed series running at the OnBarUpdate() start?

      Thanks

      Comment


        #4
        U r right! Thx for telling me about that, I am new to ninja trader. Your answer help me alot!!!

        After I added this line of code, everything works like a charm
        if (CurrentBars[0] < 0 || CurrentBars[1] < 0 || CurrentBars[2] <0){
        return;
        }

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by cmoran13, 04-16-2026, 01:02 PM
        0 responses
        43 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        25 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        162 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        98 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        157 views
        2 likes
        Last Post CaptainJack  
        Working...
        X