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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        576 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        334 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        553 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        551 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X