I have tried price-CLOSE . . . less . . .(but no option i can see for entry, which i would need to enter signal name i presume)
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
exit on close under entry bar
Collapse
X
-
exit on close under entry bar
I cant find how to identify the entry bar for the position which has been triggered, i want to auto exit position if any candle after closes under the candle which position was entered on?
I have tried price-CLOSE . . . less . . .(but no option i can see for entry, which i would need to enter signal name i presume)Tags: None
-
Hello, thanks for writing in. You can save the CurrentBar value before placing the entry order e.g.
private int savedBar;
//in OnBarUpdate:
if(<entry condition>)
{
savedBar = CurrentBar;
EnterLong();
}
This can also be captured more precisely in the OnExecutionUpdate() event method.
Kind regards,
-ChrisL
-
Thanks Chris, but is this in strategy builder? or do i have to code this...because i dont code :/
How do i do it in strategy builder?Last edited by JohnyButton; 12-16-2022, 08:52 AM.
Comment
-
Hi Johny, thanks for the follow up. OnExecutionUpdate can not be used in the builder, but you can make an Int variable in the Inputs and Variables section, then set that variable in your Entry Actions list. We have several example on using the condition builder here:
https://ninjatrader.com/support/help...gybuilder_cond ition_builder.htm
Kind regards,
-ChrisL
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 05-29-2026, 05:09 AM
|
0 responses
163 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 05:09 AM
|
||
|
Started by CaptainJack, 05-29-2026, 12:02 AM
|
0 responses
82 views
0 likes
|
Last Post
by CaptainJack
05-29-2026, 12:02 AM
|
||
|
Started by charlesugo_1, 05-26-2026, 05:03 PM
|
0 responses
125 views
0 likes
|
Last Post
by charlesugo_1
05-26-2026, 05:03 PM
|
||
|
Started by DannyP96, 05-18-2026, 02:38 PM
|
1 response
206 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 05-11-2026, 05:56 AM
|
0 responses
185 views
0 likes
|
Last Post
by CarlTrading
05-11-2026, 05:56 AM
|

Comment