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 rhyminkevin, Today, 04:58 PM
    4 responses
    52 views
    0 likes
    Last Post dp8282
    by dp8282
     
    Started by iceman2018, Today, 05:07 PM
    0 responses
    5 views
    0 likes
    Last Post iceman2018  
    Started by lightsun47, Today, 03:51 PM
    0 responses
    7 views
    0 likes
    Last Post lightsun47  
    Started by 00nevest, Today, 02:27 PM
    1 response
    14 views
    0 likes
    Last Post 00nevest  
    Started by futtrader, 04-21-2024, 01:50 AM
    4 responses
    50 views
    0 likes
    Last Post futtrader  
    Working...
    X