Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaScript Addons

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

    NinjaScript Addons

    I'm trying to create my own automated journaling system.
    similar to the way shown on this video.


    I wish to log a lot more information based on my indicators to help me fine tune my strategies hence why I'm creating my own.


    I have created an add on and added an Action to all my account ExecutionUpdates
    1. How do I tell which ATM was used for the execution.
    2. How do I reference each target to the original order Id.
    3. When I scale in with a new order I need to track the new targets with reference to the scale in OrderId. Is this possible and how do I do it.
    4. I would like to log the last 5 candles from the 5minute data, 15min data and 60min data. How can I access this information from the add on. I have the 5min, 15min,60min and daily charts open if this is of any help.
    5. There is indicator information on the charts I wish to access and log. Is this possible and how do I achieve it.

    I've attached basic sample code for the add on. I've attached Visual studio, but can't seem to find any method to achieve the above

    The reason I used the addon is so it is always loaded and running. However is there a better means to achieve this.

    It seems to hang NT on startup so I have to comment it out prior to starting and then compile it in. Can you see what I've done to cause this.

    Thanks

    Chris
    Attached Files

    #2
    Hello cp.trader,

    Thank you for your post.

    For your first three questions, those would all involve using order.GetOwnerStrategy(). I'm attaching our ATMStrategyIdentifier script that locates ATM strategies on a specified account and instrument and displays the current possible PnL for the stops and targets that should give you some direction there.

    For #4, that would require a BarsRequest:



    For #5, you would either need to calculate those values internally to the addon from the BarsRequest calculation as indicators cannot be called from a bars request, or f you want to venture outside of the supported realm, you could loop through indicators in a chart from the ChartControl.Indicators collection, and access the Values array from each indicator to read their plots. However, this would not have the synchronicity that would get from adding indicators within a host script that offers OnBarUpdate (not a BarsRequest.) You would also have to know which plots of an indicator represent each Value in Values.

    Indicators Collection - https://ninjatrader.com/support/help...indicators.htm

    Please let us know if we may be of further assistance to you.
    Attached Files

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Geovanny Suaza, 02-11-2026, 06:32 PM
    0 responses
    637 views
    0 likes
    Last Post Geovanny Suaza  
    Started by Geovanny Suaza, 02-11-2026, 05:51 PM
    0 responses
    366 views
    1 like
    Last Post Geovanny Suaza  
    Started by Mindset, 02-09-2026, 11:44 AM
    0 responses
    107 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Started by Geovanny Suaza, 02-02-2026, 12:30 PM
    0 responses
    569 views
    1 like
    Last Post Geovanny Suaza  
    Started by RFrosty, 01-28-2026, 06:49 PM
    0 responses
    571 views
    1 like
    Last Post RFrosty
    by RFrosty
     
    Working...
    X