Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Triggering orders to be submitted by addon via indicator
Collapse
X
-
so is there any way to submit an order utilizing an atm through the indicator im able to submit regular market orders but when i tried it with the atm it never placed an order
-
Hello Kylemcfar57x,
There is no specific means for scripts to communicate like that. Either the addon would need to monitor for conditions to be true and then submit the order or the indicator would need to monitor and submit the order.
Addons are not intended to serve as a way to communicate between scripts but instead are a way to interact with windows in the platform or design your own custom tools. The underlying addon framework can be used by any type to implement account level access and have the ability to submit orders like other tools in the platform. An indicator for example can implement addon framework account class to submit orders.
Leave a comment:
-
Thank you for your response but ive seen that reference already, my question is more in line of how can i communicate to the addon class that the conditions were met in the indicator and it should execute that example
Leave a comment:
-
Triggering orders to be submitted by addon via indicator
Ok, im in the home stretch of completing my auto trader, this is my first ninja script and i haven't coded in 10+ years i relearned as i went 2k+ lines later its submitting orders through the indicator class and working like a charm, but now im stuck at adding the last bit of functionality, i have an addon where i can access the static members that give values to the chart trader selected options like qty account instrument atm, but i just realized i can only submit atm orders through the addon, can someone guide me as to how i can send something to the addon to submit the order im a bit lost this is what im using now to trigger orders, is there a way to send a trigger to have the addon place orders in place of the where i have them now
Code:if(marketPosition != 2) { Print("short"); Order mar****rder = account.CreateOrder(Instrument, OrderAction.Sell, OrderType.Market, OrderEntry.Automated, TimeInForce.Day, 1, 0, 0, string.Empty, "Bearish Diamond Short Confirmed", new DateTime(), null); account.Submit(new Order[] { mar****rder }); } else if(marketPosition == 1) { Print("Sell to cover"); Order mar****rder = account.CreateOrder(Instrument, OrderAction.SellShort, OrderType.Market, OrderEntry.Automated, TimeInForce.Day, 1, 0, 0, string.Empty, "Bearish Diamond Short Confirmed SellShort", new DateTime(), null); account.Submit(new Order[] { mar****rder }); } else { if (!semiButtonToggled) { Dispatcher.InvokeAsync(() => { semiButton.RaiseEvent(new RoutedEventArgs(Button.ClickEvent)); semiButtonToggled = true; }); } }
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
650 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
370 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
109 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
577 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Leave a comment: