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

AddOn window and Charts

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

    AddOn window and Charts

    Ok. I have a Strategy that manages a manual order entry by creating the Stop and Target along with a Trailing Stop capability.

    I attach this Strategy to a Chart (which remains hidden) and I use another Chart to place my orders manually. Everything works beautifully (took a long time to get there; but I'm there).

    Now, the next step is to convert the Strategy to an AddOn that will reside on the Control Center > New tab.

    This AddOn will have a Window that will allow setting up all needed parameters, including a flag to turn Order Management ON.

    Question: now that there is no Strategy added to a Chart, will the open Order Management window (with flag set to turn Order Management ON) allow any Chart that I use for entering an order manually allow my order management software to work? That is, will the Order Management code (referenced by the AddOn) become active and automatically manage the trade?

    If not, how can this be done?

    Ron

    PS: yes, I've reviewed the AddOnFramework, but it simply executes entry Orders with its buttons.

    #2
    Hello ronhb107,

    Thanks for opening the thread.

    NinjaScript strategies do not have the out-of-the-box context to fully understand and use Account based events, but implementing AddOn based code will allow the strategy to see all Account based positions and events for your own order management. The logic will then not care if it is assigned to a specific data series as its logic looks at the entire account.

    The last difference I could see at this point is having any incoming data to drive your logic that would be based on the chart's Data Series. Since Strategies attach to data series, and AddOn's do not, AddOn's will need to implement a BarsRequest to loop through historical data data and then process the realtime data from the BarsRequest in its own OnBarUpdate() method.

    Simply put, the order management should already be implemented/working, but getting the appropriate data to drive your logic will need to be implemented with BarsRequests instead of attaching to a data series like we do with regular NinjaScript strategies.

    I'll include publicly available reference to BarsRequests. AddOn Framework also provides a working example - https://ninjatrader.com/support/help...arsrequest.htm

    I'll be happy to work with you further if you have any additional questions.
    JimNinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by Irukandji, Yesterday, 02:53 AM
    2 responses
    17 views
    0 likes
    Last Post Irukandji  
    Started by adeelshahzad, Today, 03:54 AM
    0 responses
    3 views
    0 likes
    Last Post adeelshahzad  
    Started by CortexZenUSA, Today, 12:53 AM
    0 responses
    3 views
    0 likes
    Last Post CortexZenUSA  
    Started by CortexZenUSA, Today, 12:46 AM
    0 responses
    1 view
    0 likes
    Last Post CortexZenUSA  
    Started by usazencortex, Today, 12:43 AM
    0 responses
    5 views
    0 likes
    Last Post usazencortex  
    Working...
    X