Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
Give Stop Loss & Profit Target orders names
Collapse
X
-
Hello Gav_G,
When placing multiple entry orders that have separate exit orders, the entries will need unique signal names and the exits will need to be using the fromEntrySignal of the entry.
Also, the EntryHandling will need to be set to UniqueEntries or EntriesPerDirection will need to be set to 2.
-
Hi Gav_G,
Try to add the name of your TP/SL as illustrated below.
SetProfitTarget(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, YOURNAME1)
SetStopLoss(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, YOURNAME1, false);
SetStopLoss(@"Buy_2", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, YOURNAME2, false);
NT-Roland
Leave a comment:
-
Give Stop Loss & Profit Target orders names
Hi
Want to be able to tie the stop loss orders & profit target orders I'm setting for 2 different sell or buy positions, to the actual positions. To do this I think I need to name the actual stop loss orders & profit target orders
As an example I'm using the below to create stops & targets
Code:SetProfitTarget(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize); //SetProfitTarget(@"Buy_2", CalculationMode.Ticks, (ATR1[0]*3)/TickSize); SetStopLoss(@"Buy_1", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, false); SetStopLoss(@"Buy_2", CalculationMode.Ticks, (ATR1[0]*1.5)/TickSize, false);
Is there a way to name them so I can link which was for which position as per the above?
Thanks
Tags: None
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Jon17, Today, 04:33 PM
|
0 responses
1 view
0 likes
|
Last Post
by Jon17
Today, 04:33 PM
|
||
Started by Javierw.ok, Today, 04:12 PM
|
0 responses
6 views
0 likes
|
Last Post
by Javierw.ok
Today, 04:12 PM
|
||
Started by timmbbo, Today, 08:59 AM
|
2 responses
10 views
0 likes
|
Last Post
by bltdavid
Today, 04:10 PM
|
||
Started by alifarahani, Today, 09:40 AM
|
6 responses
41 views
0 likes
|
Last Post
by alifarahani
Today, 03:18 PM
|
||
Started by Waxavi, Today, 02:10 AM
|
1 response
21 views
0 likes
|
Last Post Today, 03:03 PM |
Leave a comment: