Thanks
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
exiting a trade
Collapse
X
-
exiting a trade
I am a beginner at programming and have been using the Wizard fairly successfully on some very simple/basic strategies. I created a program that goes long when 5 of 5 different EMAs bar(0) are > bar(1). I then created a set 2, set 3 and so on so that when EMA1, EMA2 and EMA3 of the 5 EMAs bar(0) are < bar(1) it exits the trade. The problem is that I get more than one exit if 1, 2 and 3 EMAs bar(0) are < bar(1) and also 1, 2 and 4 EMAs bar(0) are < bar(1). Can someone show me how to code the program to exit only once when any one of the several possible conditions develop? If there is a way to simplify this by coding it directly rather than in the wizard that would be even better and an example of that code would be great.
ThanksTags: None
-
Hello RobertE,
Welcome to the forum and I am happy to assist you.
To assist you further can you please send a toy NinjaScript code* replicating the behavior to support[AT]ninjatrader[DOT]com
Please append Attn:Joydeep in the subject line of the email and give a reference of this thread in the body of the email.
I look forward to assisting you further.
*The "toy" just means something that is a stripped down version that isn't necessarily the whole logic. It makes things easier to rout out.JoydeepNinjaTrader Customer Service
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by SalmaTrader, 07-07-2026, 10:26 PM
|
0 responses
50 views
0 likes
|
Last Post
by SalmaTrader
07-07-2026, 10:26 PM
|
||
|
Started by CarlTrading, 07-05-2026, 01:16 PM
|
0 responses
22 views
0 likes
|
Last Post
by CarlTrading
07-05-2026, 01:16 PM
|
||
|
Started by CaptainJack, 06-17-2026, 10:32 AM
|
0 responses
16 views
0 likes
|
Last Post
by CaptainJack
06-17-2026, 10:32 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:15 AM
|
0 responses
22 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:15 AM
|
||
|
Started by kinfxhk, 06-17-2026, 04:06 AM
|
0 responses
23 views
0 likes
|
Last Post
by kinfxhk
06-17-2026, 04:06 AM
|

Comment