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

Indicator access OnAccountItemUpdate and OnExecutionUpdate

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

    Indicator access OnAccountItemUpdate and OnExecutionUpdate

    I wish for the ability to access OnAccountItemUpdate, and OnExecutionUpdate inside an indicator.


    Without using an addon, I would like to expose account data inside an indicator, then my strategy can access the public bool, Qty, and dataseries.

    I have automated entries running against ES, RTY, NQ and YM.

    I am perfectly fine with having a long RTY and Short (ES or YM or NQ)

    I want to avoid being long or short ES and NQ at the same time. It was quite exciting to be short 5 RTY and 1 NQ today in 2 accounts each but that is a great deal of excitement.
    Yes it worked out $1150.

    If there is a way to access an add-on from a strategy and sample that would also work.

    Attached Files

    #2
    You can already do this directly from an indicator.

    You need to study Account, then just use AccountItemUpdate
    and ExecutionUpdate inside your indicator.

    Everything you see in the Account class can be used in
    any NinjaScript object -- meaning AddOn, Indicator, or
    Strategy.

    -=o=-

    Which begs the question, why is the Account class under
    AddOn in the help guide hierarchy? It should probably
    be relocated to come under Common ...

    Here's a little hint:
    Quite a bit of things documented under AddOn actually
    apply to all NinjaScripts objects.

    Hang in there!

    Comment


      #3
      Btw, study the names carefully .. for example,

      The Strategy class has OnExecutionUpdate.

      The Account class has ExecutionUpdate.

      See that?
      The 'On' prefix is missing from the Account class.

      Just saying ... these things are named differently
      (and have different arguments) but they effectively
      do the same thing.

      Comment


        #4
        Thx, I figured out how to add the Addon items in my indicator yesterday afternoon.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by SantoshXX, Today, 03:09 AM
        0 responses
        12 views
        0 likes
        Last Post SantoshXX  
        Started by DanielTynera, Today, 01:14 AM
        0 responses
        2 views
        0 likes
        Last Post DanielTynera  
        Started by yertle, 04-18-2024, 08:38 AM
        9 responses
        41 views
        0 likes
        Last Post yertle
        by yertle
         
        Started by techgetgame, Yesterday, 11:42 PM
        0 responses
        12 views
        0 likes
        Last Post techgetgame  
        Started by sephichapdson, Yesterday, 11:36 PM
        0 responses
        2 views
        0 likes
        Last Post sephichapdson  
        Working...
        X