Lets say I am long, and another long order was triggered, I want the ability to trigger the order and still be able to keep track of each target and stop loss order, so that I can call them from OnOrderUpdate method. Also I want to know if a short order is triggered while I have multiple long positions, I want to be able to access the long positions to close them as well as cancelling their targets and stop loss orders.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Looking for an example on managing multiple buy/sell signals while market is no flat
Collapse
X
-
Looking for an example on managing multiple buy/sell signals while market is no flat
I am looking for an example of running a strategy that triggers a buy or sell order independent of whether Market position is flat or not? For example:
Lets say I am long, and another long order was triggered, I want the ability to trigger the order and still be able to keep track of each target and stop loss order, so that I can call them from OnOrderUpdate method. Also I want to know if a short order is triggered while I have multiple long positions, I want to be able to access the long positions to close them as well as cancelling their targets and stop loss orders.Tags: None
-
Hello Yandychang, thanks for your post.
There is an example here on how to use Order objects in a strategy. This lets you submit your own stop and target orders when the order executes. This concept can be expanded to work with multiple entries with their own stop and target.
Please let me know if you have any questions.
Chris L.NinjaTrader Customer Service
- Likes 1
-
Originally posted by NinjaTrader_ChrisL View PostHello Yandychang, thanks for your post.
There is an example here on how to use Order objects in a strategy. This lets you submit your own stop and target orders when the order executes. This concept can be expanded to work with multiple entries with their own stop and target.
https://ninjatrader.com/support/help...and_onexec.htm
Please let me know if you have any questions.
Comment
-
Originally posted by sliverhllc View Post
Hi, I use AtmStrategyCreate() method in my NT8 strategy to enter a long/short position. Is it possible to achieve what Yandychang has asked above while using this method?
Thank you for your note and welcome to the NinjaTrader forum community!
There is a difference between ATM strategies and NinjaScript strategies. I recommend reviewing the page here:
It is important to note, as stated on that page, "Executions from ATM Strategies will not have an impact on the hosting NinjaScript strategy position and PnL - the NinjaScript strategy hands off the execution aspects to the ATM, thus no monitoring via the regular NinjaScript strategy methods will take place (also applies to strategy performance tracking)"
That said, even if different ATM strategies are triggered by your script (even simultaneously) you should be able to monitor and manage them with the available ATM strategy methods such as GetAtmStrategyEntryOrderStatus(), AtmStrategyChangeStopTarget(), etc:
For a full working example that uses ATM strategies, please refer to the SampleAtmStrategy that is included with NinjaTrader. You may view this from the Strategies folder in the NinjaScript Editor.
Please let us know if we may be of further assistance.Emily C.NinjaTrader Customer Service
Comment
-
Originally posted by NinjaTrader_Emily View Post
Hello silverhllc,
Thank you for your note and welcome to the NinjaTrader forum community!
There is a difference between ATM strategies and NinjaScript strategies. I recommend reviewing the page here:
It is important to note, as stated on that page, "Executions from ATM Strategies will not have an impact on the hosting NinjaScript strategy position and PnL - the NinjaScript strategy hands off the execution aspects to the ATM, thus no monitoring via the regular NinjaScript strategy methods will take place (also applies to strategy performance tracking)"
That said, even if different ATM strategies are triggered by your script (even simultaneously) you should be able to monitor and manage them with the available ATM strategy methods such as GetAtmStrategyEntryOrderStatus(), AtmStrategyChangeStopTarget(), etc:
For a full working example that uses ATM strategies, please refer to the SampleAtmStrategy that is included with NinjaTrader. You may view this from the Strategies folder in the NinjaScript Editor.
Please let us know if we may be of further assistance.
Comment
-
Hello sliverhllc,
Thank you for your reply.
With the way that ATM strategies are managed separately from the standard NinjaScript strategy logic and the difference in commands, you would have to get separate profit/loss values and keep a running total by adding the numbers together. This is demonstrated in the reference sample "Getting PnL from an ATM strategy" found here:
Please don't hesitate to reach out with any additional questions or concerns.Emily C.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by TheWhiteDragon, 01-21-2019, 12:44 PM
|
4 responses
541 views
0 likes
|
Last Post
by PaulMohn
Today, 04:09 AM
|
||
Started by GLFX005, Today, 03:23 AM
|
0 responses
3 views
0 likes
|
Last Post
by GLFX005
Today, 03:23 AM
|
||
Started by XXtrader, Yesterday, 11:30 PM
|
2 responses
11 views
0 likes
|
Last Post
by XXtrader
Today, 03:07 AM
|
||
Started by Waxavi, Today, 02:10 AM
|
0 responses
7 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
14 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
Comment