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 kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
12 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
59 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
41 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
47 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
38 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Comment