Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Execute when bar crosses SMA
Collapse
X
-
Hello JT1230,
Thanks for your post.
As you are using the Bollinger indicator it would make sense to use that as the comparison. You could code something like:
if (Position.MarketPosition == MarketPosition.Short && Close[0] > = Bollinger(2, 20).Middle[0])
{
ExitShort();
}
You may want to change Close for High, depends on your needs,
ExitShort: "Generates a buy to cover market order to exit a short position." Helpguide link: http://ninjatrader.com/support/helpG...?exitshort.htm
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
125 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
105 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
84 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
104 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
83 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Comment