Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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
      BertrandNinjaTrader Customer Service

      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 WHICKED, Today, 12:45 PM
        2 responses
        18 views
        0 likes
        Last Post WHICKED
        by WHICKED
         
        Started by GussJ, 03-04-2020, 03:11 PM
        15 responses
        3,276 views
        0 likes
        Last Post xiinteractive  
        Started by Tim-c, Today, 02:10 PM
        1 response
        8 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by Taddypole, Today, 02:47 PM
        0 responses
        5 views
        0 likes
        Last Post Taddypole  
        Started by chbruno, 04-24-2024, 04:10 PM
        4 responses
        51 views
        0 likes
        Last Post chbruno
        by chbruno
         
        Working...
        X