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 CaptainJack, 05-29-2026, 05:09 AM
        0 responses
        267 views
        0 likes
        Last Post CaptainJack  
        Started by CaptainJack, 05-29-2026, 12:02 AM
        0 responses
        169 views
        0 likes
        Last Post CaptainJack  
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        171 views
        1 like
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        260 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        210 views
        0 likes
        Last Post CarlTrading  
        Working...
        X