Announcement
Collapse
Looking for a User App or Add-On built by the NinjaTrader community?
Visit NinjaTrader EcoSystem and our free User App Share!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less
Partner 728x90
Collapse
NinjaTrader
stop and reverse
Collapse
X
-
stop and reverse
How does a stop and reverse scenario play out when running strategies? If I'm short and an order is sent out to go long 2 contracts will that result in being long 1 contract or being long 2 contracts? In other words, does the short need to be exited before a long order will be accepted or is the short exited when a long order is sent out or is the short offset by the number of long contracts filled? Basically, what is the most efficient way to get from being short 1 contract to being long one contract when i want to "stop and reverse" an existing short position?Last edited by gordongekko; 02-21-2018, 02:35 PM.Tags: None
-
Hello gordongekko,
Thanks for your post.
That is correct, if you are long and what to reverse, 1 short would close the long position and another short would leave you in a short position.
The methods EnterLong() and EnterShort() will do reversing. You can see an example of use with the strategy SampleMACrossover in your NinjaTrader. There are only two conditions, there are only two entry orders needed.
The EnterLong() and EnterShort() method determine if an existing position in the opposite direction exists and if so will place two orders one to close the opposite direction and one to put you in the new direction. Using these methods would be the most efficient as they use market orders that are filled immediately.Paul H.NinjaTrader Customer Service
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by md4866, 05-01-2024, 08:15 PM
|
2 responses
18 views
0 likes
|
Last Post
by md4866
Today, 12:33 PM
|
||
Started by samish18, Today, 12:20 PM
|
0 responses
7 views
0 likes
|
Last Post
by samish18
Today, 12:20 PM
|
||
Started by thread, 04-15-2024, 11:58 PM
|
3 responses
48 views
0 likes
|
Last Post
by Georg1o
Today, 12:05 PM
|
||
Started by leojimenezp, 04-20-2024, 05:49 PM
|
4 responses
49 views
0 likes
|
Last Post
by leojimenezp
Today, 11:49 AM
|
||
Started by nicthe, Today, 09:24 AM
|
1 response
7 views
0 likes
|
Last Post
by nicthe
Today, 10:57 AM
|
Comment