The candle of the 17h is bad, but for the system is good, if the order comes out in the following candle there are no problems and he does it well.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Backtesting does not work
Collapse
X
-
Backtesting does not work
To make the backtesting the system gives me all the orders as good because when the candles are very large and breaks my stop in the same candle, does not make it as bad. How do I solve this problem?.
The candle of the 17h is bad, but for the system is good, if the order comes out in the following candle there are no problems and he does it well.Tags: None
-
elgrajillo, in backtesting NinjaTrader would take the conservative approach - if both target and stop could've been filled on the same bar it would execute the stop then. To better test your strategy here you could add more granular data to it - http://www.ninjatrader.com/support/f...ead.php?t=6652
-
I am truing to backtest a strategy but it doesn't work, I a msure the problem is because there is something wrong in the code. I have this:
if (Position.MarketPosition==MarketPosition.Flat)
{
if (High [1] > High [0])
{
Tope = High[0];
}
else
{
Tope = High [1];
}
if (Low [1] > Low [0])
{
Base = Low[0];
}
else
{
Base = Low [1];
}
}
I previously declared the variable Tope=0 and Base=0
What I want is to enterlong in the middle between Tope and Base, so I wrote this:
EnterLongLimit((Tope-Base)/2,"BuyOrder")
For the stoploss and profit target:
if (Position.MarketPosition== MarketPosition.Long)
SetStopLoss ("Largos",CalculationMode.Percent,Base-Base*StPct,false);
SetProfitTarget(CalculationMode.Ticks, 6);
Any idea why the backtest results are there 0 trades?
Thanks
Comment
-
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CarlTrading, 03-31-2026, 09:41 PM
|
1 response
64 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
35 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
59 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
62 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
51 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment