Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multiple SetStopLoss & SetProfitTarget Orders Combine
Collapse
X
-
Hi singjay, thanks for posting. Its the StopTargetHandling setting you have. Set it to StopTargetHandling.PerEntryExecution to match the quantity of each entry execution.
Kind regards,
-ChrisL
-
Multiple SetStopLoss & SetProfitTarget Orders Combine
Trying to place multiple long orders with each having its own unique stop loss and take profit target. Once placed I can see separate SL and TP orders but somehow with quantity of combined orders. Please see the attached screenshot and parts of the strategy code below. Every SL and TP is having 3000 quantity instead of 1000 each.
Please advise how can this be resolved. Thanks.
Code:if (State == State.SetDefaults) { EntryHandling = EntryHandling.UniqueEntries; StopTargetHandling = StopTargetHandling.ByStrategyPosition; } if (Position.MarketPosition == MarketPosition.Flat { SetStopLoss("orderLong1", CalculationMode.Currency, 500, false); SetStopLoss("orderLong2", CalculationMode.Currency, 600, false); SetStopLoss("orderLong3", CalculationMode.Currency, 700, false); SetProfitTarget("orderLong1", CalculationMode.Currency, 250); SetProfitTarget("orderLong2", CalculationMode.Currency, 450); SetProfitTarget("orderLong3", CalculationMode.Currency, 650); EnterLong(1000, "orderLong1"); EnterLong(1000, "orderLong2"); EnterLong(1000, "orderLong3"); }
Last edited by singjay; 07-15-2022, 07:57 PM.Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Nancy75, Today, 10:22 AM
|
1 response
4 views
0 likes
|
Last Post Today, 10:32 AM | ||
Started by Armin, Today, 02:26 AM
|
1 response
14 views
0 likes
|
Last Post Today, 10:26 AM | ||
Windows Updates causing NT8.1.x to generate new machine ID - unstable domino effect
by xiinteractive
Started by xiinteractive, 08-08-2023, 11:55 AM
|
44 responses
887 views
3 likes
|
Last Post
by bltdavid
Today, 10:12 AM
|
||
Started by Thomas75k, 11-29-2024, 02:11 AM
|
7 responses
76 views
0 likes
|
Last Post Today, 10:04 AM | ||
Started by nelslynn, Today, 09:34 AM
|
1 response
8 views
0 likes
|
Last Post Today, 09:46 AM |
Leave a comment: