Hi,
thanks to the fantastic feature of NT of allowing custom bar types, I was able to create my own. It doesn't represent price and can go negative.
Unfortunately the problem is that when I utilize it in a strategy as an additional data series to a time based one the order management fail.
It looks like NT will use the closing price of my custom bars to determine exits.
Is there a way in either the bar type itself or when adding the data series to let NT know that it should not base trades on the bars output?
AddDataSeries( new BarsPeriod{ BarsPeriodType = (BarsPeriodType) 16 , Value = BarsPeriod.Value } ) ... SetProfitTarget(signalName, CalculationMode.Ticks, 20); SetStopLoss(signalName, CalculationMode.Ticks, 20, false); EnterLong(1, 0, signalName);
If I change the logic to CalculationMode.Price no error occurs but just like with ticks the strategy analyzer shows millions in profits or losses on just 1 YM lot and 1000 trades within 4 months.
My assumption is:
1. entering on primary series YM close at 22000
2. custom bar closes at 5
3. NT exits with a 21995 ticks loss
Entering on primary or secondary BarsInProress doesn't make any difference and trying to supply a MarketDataType to AddDataSeries was without success.
Since there are other bar types like the heiken ashi that do not strictly follow price, is there a simple way to bypass the problem?
Thanks in advance.
Comment