Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Access Price Data for Instrument not Added as Series

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

    Access Price Data for Instrument not Added as Series

    Hi

    How do I access price data for an instrument that has not been added as a data series?

    The reason I ask is that to calculate the correct position size I need to access the counter currency and dont want to add the counter currency as a data series.

    Thanks

    Mike

    #2
    Hi Mike, this is unfortunately not possible - to access another instruments data programmatically you would have to Add() it first.

    Comment


      #3
      Thanks Bertrand.

      How do you add a new Dataseries out side the Initialize(). If I try and call Add outside the Initialize() I get an exception.

      Thanks

      Mike

      Comment


        #4
        Unfortunately an expected exception - you would need to Add() in the script's Initialize() method.

        Comment


          #5
          So is it not possible to Add a data series using a different method at a later stage?

          Comment


            #6
            Unfortunately not in a supported way...as a hint you can look into the asynchronous loading the Pivots indicator would use...

            Comment


              #7
              Thanks for your help, that was just what I was after.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by Hwop38, 05-04-2026, 07:02 PM
              0 responses
              164 views
              0 likes
              Last Post Hwop38
              by Hwop38
               
              Started by CaptainJack, 04-24-2026, 11:07 PM
              0 responses
              319 views
              0 likes
              Last Post CaptainJack  
              Started by Mindset, 04-21-2026, 06:46 AM
              0 responses
              246 views
              0 likes
              Last Post Mindset
              by Mindset
               
              Started by M4ndoo, 04-20-2026, 05:21 PM
              0 responses
              350 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Started by M4ndoo, 04-19-2026, 05:54 PM
              0 responses
              179 views
              0 likes
              Last Post M4ndoo
              by M4ndoo
               
              Working...
              X