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

building OIF dynamically from an indicator

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

    building OIF dynamically from an indicator

    Hello,

    I want to build and write a OIF file from an indicator.

    In this case only to Close a Position.

    All I need is the Account and the Instrument name....

    I believe I can get the account from Instrument.FullName.

    But where can I dynamically get the Account in CharTrader from the Indicator code?

    I can't seem to find this in the documentation or forum.

    Thank you.

    #2
    Turtle Trader,

    Unfortunately there is no supported way to get account information from an Indicator. You could do this from a strategy however.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      ok

      Ok, well perhaps I can have a strategy tell the indicator what the account is...

      Can you please point me to the correct instruction on how to get the account info...thx

      Comment


        #4
        Turtle Trader :

        The Account class is not exposed in an indicator, like it is exposed in a strategy. You can refer to this code to get an idea how to expose the Account class, but nothing we would support officially.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          ok

          thank you, this should do it

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Waxavi, 04-19-2024, 02:10 AM
          3 responses
          41 views
          0 likes
          Last Post gaz0001
          by gaz0001
           
          Started by Max238, Today, 01:28 AM
          2 responses
          26 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Started by Shansen, 08-30-2019, 10:18 PM
          25 responses
          949 views
          0 likes
          Last Post NinjaTrader_BrandonH  
          Started by JonesJoker, 04-22-2024, 12:23 PM
          8 responses
          42 views
          0 likes
          Last Post JonesJoker  
          Started by timko, Today, 06:45 AM
          0 responses
          6 views
          0 likes
          Last Post timko
          by timko
           
          Working...
          X