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
breakeven in strategy. can have profit target and stop loss
Collapse
X
-
breakeven in strategy. can have profit target and stop loss
i did the breakeven in my strategy from the example provided in this forum. i read that when you do the trailing stops you can't have profit target and stop loss. is this true with the breakeven?Tags: None
-
-
Hello SteveReiza,
I dont know of a specific example like that, the modification would not be difficult to do. You would just submit 1 additional order from the last set that is a limit order and set the price to a price that's above the market. The trail sample and breakeven sample are long only strategies so the offsets you would use for the target would need to be above market.
Keep in mind that while using the builder in this way the orders would not be tied by OCO so if you use a target price that is too close to the active market when the stop fills you run the risk of also filling the target. The same would happen if the target filled and then the price went down to the stop price before the order was expired.
JesseNinjaTrader Customer Service
Comment
-
-
Hello SteveReiza,
Position average price would be the price which your entry fill created, that can be used as a starting price for an offset for targets.
The purpose of the last set in those samples is to keep the order alive until it fills, you need to keep calling the order method so it does not expire. Once the position is flat that will change the stop price variable to 0 so the final set stops being true, on the next bar update any active orders like targets would then be expired.
JesseNinjaTrader Customer Service
Comment
-
thanks for the reply. it's a little over my head. i'll get an ecosystem developer to dial it in. unless, you can make a tutorial video
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by DJ888, Today, 10:57 PM
|
0 responses
5 views
0 likes
|
Last Post
by DJ888
Today, 10:57 PM
|
||
Started by MacDad, 02-25-2024, 11:48 PM
|
7 responses
158 views
0 likes
|
Last Post Today, 10:23 PM | ||
Started by Belfortbucks, Today, 09:29 PM
|
0 responses
7 views
0 likes
|
Last Post
by Belfortbucks
Today, 09:29 PM
|
||
Started by zstheorist, Today, 07:52 PM
|
0 responses
7 views
0 likes
|
Last Post
by zstheorist
Today, 07:52 PM
|
||
Started by pmachiraju, 11-01-2023, 04:46 AM
|
8 responses
151 views
0 likes
|
Last Post
by rehmans
Today, 06:44 PM
|
Comment