cls71
10-06-2009, 04:59 AM
I am doing a port of a custom type which calculates the bid-ask pressure. The value of the pressure may be positive, negative or zero.
I was using the field volume to save the pressure value.
This custom type works perfectly in NT 6.5.
However, in NT 7.0 doesn't work. Looks like if NT recalculates the field Volume when is less than zero.
In this example just at moment before the AddBar is executed, the last bar of the serie has a volume value = -1000. It's correct.
http://www.ninjatrader-support2.com/vb/attachment.php?attachmentid=7194&stc=1&d=1254822581
However, when the AddBar sentence is executed, the volume of the previous bar is modified.
http://www.ninjatrader-support2.com/vb/attachment.php?attachmentid=7195&stc=1&d=1254822581
I don't know if this is a bug or an internal prohibition of NT.
For testing this issue I have coded a custom type like the Volume standard type, which assign -1000 to all bars.
(Would be like the volume type with period type = 1000, but negative).
All bars show a volume = 24.
If the period value = -5000, then all bars show a volume = 120 ( 24x5)
Thanks.
I was using the field volume to save the pressure value.
This custom type works perfectly in NT 6.5.
However, in NT 7.0 doesn't work. Looks like if NT recalculates the field Volume when is less than zero.
In this example just at moment before the AddBar is executed, the last bar of the serie has a volume value = -1000. It's correct.
http://www.ninjatrader-support2.com/vb/attachment.php?attachmentid=7194&stc=1&d=1254822581
However, when the AddBar sentence is executed, the volume of the previous bar is modified.
http://www.ninjatrader-support2.com/vb/attachment.php?attachmentid=7195&stc=1&d=1254822581
I don't know if this is a bug or an internal prohibition of NT.
For testing this issue I have coded a custom type like the Volume standard type, which assign -1000 to all bars.
(Would be like the volume type with period type = 1000, but negative).
All bars show a volume = 24.
If the period value = -5000, then all bars show a volume = 120 ( 24x5)
Thanks.