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 MacDad, 02-25-2024, 11:48 PM
        7 responses
        158 views
        0 likes
        Last Post loganjarosz123  
        Started by Belfortbucks, Today, 09:29 PM
        0 responses
        6 views
        0 likes
        Last Post Belfortbucks  
        Started by zstheorist, Today, 07:52 PM
        0 responses
        7 views
        0 likes
        Last Post zstheorist  
        Started by pmachiraju, 11-01-2023, 04:46 AM
        8 responses
        151 views
        0 likes
        Last Post rehmans
        by rehmans
         
        Started by mattbsea, Today, 05:44 PM
        0 responses
        6 views
        0 likes
        Last Post mattbsea  
        Working...
        X