Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Multi-Instrument Strategy
Collapse
X
-
Thanks Bertrand, it is working good with the enter. However, with the ExitLong() or ExitShort statement are working. Every enter position is closing only with profit target level instead of closing when I am opening a new position in the opposine direction.
Initialize()
EntriesPerDirection = 4;
EntryHandling = EntryHandling.AllEntries;
OnBarUpdate()
if .........something
{
EnterShort(1,quantityOrder,"short1");
EnterShort(2,quantityOrder,"short2");
EnterShort(3,quantityOrder,"short3");
ExitLong("long");
}
else if ....something
{
EnterLong(5,quantityOrder,"long");
ExitShort("short1");
ExitShort("short2");
ExitShort("short3");
}
It is entering new positions but is not exiting the latest one....it close only when meet the profit target.
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Mestor, 03-10-2023, 01:50 AM
|
12 responses
307 views
0 likes
|
Last Post
by z.franck
Today, 04:29 AM
|
||
Started by AgriTrdr, 07-16-2023, 12:54 PM
|
32 responses
267 views
0 likes
|
Last Post
by f.saeidi
Yesterday, 06:49 AM
|
||
Started by Mestor, Today, 03:15 AM
|
0 responses
2 views
0 likes
|
Last Post
by Mestor
Today, 03:15 AM
|
||
Started by Padan, Today, 02:02 AM
|
0 responses
6 views
0 likes
|
Last Post
by Padan
Today, 02:02 AM
|
||
Started by bukowa, 11-09-2023, 06:07 PM
|
20 responses
409 views
0 likes
|
Last Post
by Adfra
Today, 01:36 AM
|
Comment