• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

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 Debayan Sen, Today, 01:50 AM
    0 responses
    3 views
    0 likes
    Last Post Debayan Sen  
    Started by eleven, Yesterday, 10:03 PM
    1 response
    9 views
    0 likes
    Last Post eleven
    by eleven
     
    Started by tvbecv, Yesterday, 09:23 PM
    0 responses
    8 views
    0 likes
    Last Post tvbecv
    by tvbecv
     
    Started by reedstickets, Yesterday, 08:07 PM
    0 responses
    9 views
    0 likes
    Last Post reedstickets  
    Started by timko, Yesterday, 07:39 PM
    0 responses
    5 views
    0 likes
    Last Post timko
    by timko
     
    Working...
    X