Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
How to ...
Collapse
X
-
How to ...
... limit # of trades to 1 entry per indicator reversal. For example, if my strategy was to enter short when the previously upticking SMA10 reverses direction to down, I want just one trade (short) until the SMA10 reverses and goes back up again (at which point I would want just one long trade to kick in). As it is, I am getting new trades posting with every new bar in the direction of the indicator line -- how can I limit it to just one trade until the indicator reverses and, again, at that time just one trade in the opposite direction? Thanks in advance.Tags: None
-
I see ...
... so it cannot be done via strategy wizard? The parameter I'm asking for isn't achieved by a crossover -- just looking for one entry per reversal direction when a line changes directions. Seems simple enough -- would I have to add a line or two of code to the strategy?
Comment
-
Hello,
This is Brett following up.
This can be done in the strategy wizard.
You would need to use code or a strategy wizard setup that will only trigger once as Bert suggested. You will need to find a way to code your strategy so that it only enters once. Something similar to CrossAbove or CrossBelow depending on what you need.
You could also use a limiter variable so that you only trade once the variable is set to a value that you check for in your entry conditions. In this case you could add a variable that you set to 1 when you want no more trades to take place and then change back to 0 to allow the strategy to place a trade. Then check for this in your strategy when you place your order. You would need to use some method that the computer would understand so that it knows when your ready to trade again. Such as if the SMA line is higher then the SMA of 5 bars ago, this will need to change based on how your strategy is set up.
Comment
-
One Entry Per Direction
If you just want to limit one trade per direction then the Code is : (NT7)
protected override void Initialize()
{
EntriesPerDirection = 1;
EntryHandling = EntryHandling.AllEntries;
}
Or in the parameters for the strategy set the above entries. See attached image.
Comment
-
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by Waxavi, Today, 02:10 AM
|
0 responses
3 views
0 likes
|
Last Post
by Waxavi
Today, 02:10 AM
|
||
Started by TradeForge, Today, 02:09 AM
|
0 responses
8 views
0 likes
|
Last Post
by TradeForge
Today, 02:09 AM
|
||
Started by Waxavi, Today, 02:00 AM
|
0 responses
2 views
0 likes
|
Last Post
by Waxavi
Today, 02:00 AM
|
||
Started by elirion, Today, 01:36 AM
|
0 responses
4 views
0 likes
|
Last Post
by elirion
Today, 01:36 AM
|
||
Is it possible to have a drawing, such as a line, cycle through different colors?
by gentlebenthebear
Started by gentlebenthebear, Today, 01:30 AM
|
0 responses
4 views
0 likes
|
Last Post Today, 01:30 AM |
Comment