Removing this and changing the classname of the script corrected the issue.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Limiting consecutive same direction trades
Collapse
X
-
Strategy Wizard?
Is there a way in the wizard to code saying that I want to only take longs above a certain price and only take shorts below that same price? I've tried a couple of conditions without success.Thanks in advance
Comment
-
Strategy Analyzer
I've looked in ninjatrader help and I guess I'm having a senior moment. Could you direct me on to get to the strategy analyzer? Also, is their a way to code in the wizard when a buy condition is met to say buy at the next bar open less 2 ticks? Thanks
Comment
-
Coding a color in strategy wizard
Is there a way to code in the wizard a condition saying to go long when the indicator plots green and short when it plots red? Thank you
Comment
-
Profit Target Not Working
I'm using the strat wizard because of my lack of coding expertise. Attached are a few screenshots of what I'm trying to accomplish. For example, I have a limit order to enter long and I'm trying to exit at 10 ticks profit, but on the trade I'm sending screen shot of, the entry long was 1140.8, the price did exceed 1141.8, but it did not fill. I have no clue why. Your help is appreciated. Thanks
Comment
-
Hi futures614,
The SetProfitTarget on the last page of the wizard is set to EnterLongLimit and EnterShortLimit fromSignalNames.
However, in your screenshot showing Condition Set 1, there is no signal name used on the EnterLongLimit.
This means the SetProfitTarget is attached to nothing and will not close your order.
If you do not use a signalName in the entry order, do not use a fromSignalName in the exit.
Signal names are used to match an exit order to an entry order.
Below are links to the help guide. In the Managed Approach read 'Entry Methods'. In SetProfitTarget, read the bit about fromSignalNames.
http://www.ninjatrader.com/support/h...d_approach.htm
http://www.ninjatrader.com/support/h...ofittarget.htmChelsea B.NinjaTrader Customer Service
Comment
-
Limit to one trade per direction
Good morning,
I'm working on a strat thru the wizard and would like to tell the strat only take the first long when the signal is given and vice versa for when a short is signaled. In other words, I don't want it to take more than the initial trade in any given direction. I would appreciate your help. Thank you in advance.
Gary
Comment
-
Hello Gary,
The number of trades in a direction is controlled by the Entries per direction option in the Strategy Parameters when running / backtesting the script.
If this is set to 1 and the EntryHandling is set to AllEntries, only 1 long entry will be allowed, or 1 short entry will be allowed. All other orders will be ignored.
http://www.ninjatrader.com/support/h...t_strategy.htm
You can also check your position to see if you are long or short and use that to prevent an order.
For example on the entry conditions have a condition added with:
'Strategy -> Current market position' selected on the left
'!=' as the operator in the center
'Strategy -> Long' seleted on the rightChelsea B.NinjaTrader Customer Service
Comment
-
Thanks for your response.
I'm not sure I asked my question correctly. What I would like the strat to do is only show results of taking the initial long signal and then not take any more longs once the profit target or stop has been reached. Then the next signal the strat would take would be a short. I want to rotate between taking a long, reaching target or stop loss and then the strat goes short based on the trading parameters. What I have now takes one long after another, for example, if in an extended uptrend. Maybe what I'm asking is not possible? Thanks for your indulgence.
Comment
-
Hi futures614,
For ensuring the next order is in the opposite direction of the previous order, you will want to use a bool or some variable that holds the state.
After the order goes in, change the value of the bool. Use the bool in the condition to ensure the state of the bool before placing an order.
For example:
In #region Variables:
private bool takeLong = true;
In OnBarUpdate():
if (takeLong == true)
{
EnterLong();
takeLong = false;
}
else
{
EnterShort();
takeLong = true;
}Chelsea B.NinjaTrader Customer Service
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by ninza33, Today, 07:16 AM
|
3 responses
13 views
0 likes
|
Last Post
by ninza33
Today, 09:01 AM
|
||
Started by foxtrott21, Today, 08:27 AM
|
0 responses
1 view
0 likes
|
Last Post
by foxtrott21
Today, 08:27 AM
|
||
Started by jaypelle3, Today, 08:26 AM
|
0 responses
1 view
0 likes
|
Last Post
by jaypelle3
Today, 08:26 AM
|
||
Started by linkcou, Today, 07:01 AM
|
2 responses
24 views
0 likes
|
Last Post
by bltdavid
Today, 08:25 AM
|
||
Started by jaypelle3, Today, 08:25 AM
|
0 responses
6 views
0 likes
|
Last Post
by jaypelle3
Today, 08:25 AM
|
Comment