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
Strategy Builder and ATM
Collapse
X
-
Is there a way wherein you can create exit conditions that build upon one another?
I have a condition set that if the current price is 200 ticks above total position price, exit 1 contract (of 3 held). Is there a way to make the next exit 200 ticks above where that first piece was sold?
Comment
-
Hello CactusMan,
The Like to your post can be read as acknowledgement that a vote has been added.
You could consider when in your "200 ticks above AverageEntryPrice" Exit condition, to assign a value to a variable of type double with the value of Strategy > Average Position Price with an offset of 400 ticks. We can call the variable "400TicksAbove"
Then, in another condition set, you can compare the current price against the "400TickAbove" variable for your second exit.
When working with variables, it is important to reset them to initial values. For example, you can reset this variable to a very high value when the strategy position is flat, when you place your entry order. That way, when you enter a second time, the condition using "400TickAbove" will not exit at an unintended time/price.
For more information on making various comparisons in the Strategy Builder like position checks and comparing price levels, please see the resources below.
Conditions examples - https://ninjatrader.com/support/help...on_builder.htm
Actions examples - https://ninjatrader.com/support/help...t8/actions.htm
Variables can be created in the Inputs and Variables page of the Strategy builder. They can be assigned under Actions and read inside Conditions.
Inputs and Variables - https://ninjatrader.com/support/help...ariablesScreenJimNinjaTrader Customer Service
Comment
-
Hello Hodgsohi and mmenigma,
Thanks for your notes.
Both of your votes have been added to this feature request.
As with all feature requests, interest is tracked before implementation is considered, so we cannot offer an ETA or promise of fulfillment. If implemented, it will be noted on the Release Notes page of the Help Guide.Brandon H.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Touch-Ups, Today, 10:36 AM
|
0 responses
2 views
0 likes
|
Last Post
by Touch-Ups
Today, 10:36 AM
|
||
Started by geddyisodin, 04-25-2024, 05:20 AM
|
8 responses
61 views
0 likes
|
Last Post Yesterday, 10:45 AM | ||
Started by jxs_xrj, 01-12-2020, 09:49 AM
|
4 responses
3,289 views
1 like
|
Last Post
by jgualdronc
Today, 10:02 AM
|
||
Can someone turn this thinkscript into a ninjascript. 5PM CST OHL and Previous Day
by Option Whisperer
Started by Option Whisperer, Today, 09:55 AM
|
0 responses
5 views
0 likes
|
Last Post Today, 09:55 AM | ||
Started by halgo_boulder, 04-20-2024, 08:44 AM
|
2 responses
22 views
0 likes
|
Last Post Today, 09:41 AM |
Comment