Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Instrument price quote without adding another series?

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

    Instrument price quote without adding another series?

    This may be a quirky question but I need to get a current bid or ask price of a currency pair in a strategy that does not use said currency pair for execution or any other runtime calculation.

    I don't want to add another series as I only need this during live trading. Is there a way to simply pull the current bid,ask,price of for instance the CAD/JPY without having to add another series that loads the entire chart length of the CAD/JPY? The price quote would only be used intermittently for position sizing. I hope this makes sense.

    #2
    Hello molecool,

    Without adding the instrument in question to the a Script I do not know of a way this may be done.

    Happy to be of further assistance.
    JCNinjaTrader Customer Service

    Comment


      #3
      Originally posted by NinjaTrader_JC View Post
      Hello molecool,

      Without adding the instrument in question to the a Script I do not know of a way this may be done.

      Happy to be of further assistance.
      I was just thinking - since I only need a bid (or ask) during live trading: Couldn't I simply add a day series? Those get updated on a tick basis during live trading - so if I would query the day series when I need an accurate bid then I should be fine. Please correct me if I'm mistaken.

      So from there all I would need to do is this?

      Code:
      double cBid = GetCurrentBid(2) // - third bar series
      double cAsk = GetCurrentAsk(2) //- third bar series
      Last edited by molecool; 07-14-2013, 05:22 AM.

      Comment


        #4
        Hello molecool,

        Thank you for your response.

        All Period Types are updated in real-time if you have a real-time data feed provider.

        Using another bars object in your strategy means you will access it's values the same way as the other bars objects in your strategy. If you wish to call the Bid or Ask of that added series then your code appears to be correct based on the information you have provided.

        Please let me know if I may be of further assistance.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        634 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        364 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        105 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        567 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        568 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X