Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Triggering orders to be submitted by addon via indicator

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

  • Kylemcfar57x
    replied
    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

    Leave a comment:


  • NinjaTrader_Jesse
    replied
    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:


  • Kylemcfar57x
    replied
    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:


  • NinjaTrader_Jesse
    replied
    Hello balltrader,

    To submit an ATM using the addon framework you can see the following link:



    Your addon or indicator can make use of the account class and its methods like StartATMStrategy.

    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;
                                            });
                                        }
                                    }​

    Click image for larger version  Name:	image.png Views:	0 Size:	69.1 KB ID:	1232996

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 Geovanny Suaza  
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
0 responses
370 views
1 like
Last Post Geovanny Suaza  
Started by Mindset, 02-09-2026, 11:44 AM
0 responses
109 views
0 likes
Last Post Mindset
by Mindset
 
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
0 responses
574 views
1 like
Last Post Geovanny Suaza  
Started by RFrosty, 01-28-2026, 06:49 PM
0 responses
577 views
1 like
Last Post RFrosty
by RFrosty
 
Working...
X