• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Predictive Bollinger Band: Passing in Custom Data Series

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

    Predictive Bollinger Band: Passing in Custom Data Series

    I am having trouble passing in a custom data series to the BollingerEMA function.

    I created a Data Series called High_Series that has closing values of the RangeBars for all values except currentBar where the value is the Max close of the Range Bar. I want to predict the BB Upper value on Range Bar close if closes at top of Range Bar.

    Data Series has below data and I can see it is as expected. in the 0 index position 53.58 is the MaxRangeBar Close value all other values match actual closes.
    index: value Close (actual)
    0:53.58 Close: 53.5
    1:53.44 Close: 53.44
    2:53.57 Close: 53.57
    3:53.52 Close: 53.52
    4:53.45 Close: 53.45
    5:53.56 Close: 53.56
    6:53.65 Close: 53.65
    7:53.49 Close: 53.49
    8:53.37 Close: 53.37
    9:53.26 Close: 53.26
    10:53.26 Close: 53.26
    11:53.41 Close: 53.41
    12:53.28 Close: 53.28

    PredictBBUp2val = Math.Round(BollingerEMA (High_Series,2,12).Upper[0],2);
    PredictBBUp2val = 59.8

    But the real BB value = 53.67
    BBUpperV = Math.Round(BollingerEMA (2,12).Upper[0],2);

    Obviously something is not right about the Series I am passing in as the same function with virtually the same data should yield a number closer to the same. How best can I go about debugging this issue? I don't understand why the predicted value is so wrong given the data I fed it.

    #2
    Hello EricC64,

    Thank you for writing in.

    Without the full code I'm unable to test on my end.

    I would suggest adding print statements to check whether your conditions are becoming true. I’ve provided a link to a youtube video which covers an example of using prints to understand behavior:
    https://www.youtube.com/watch?v=K8v_...tu.be&t=48m45s

    I’ve provided a link covering debugging which you may find helpful.
    Debugging: http://ninjatrader.com/support/forum...ead.php?t=3418

    If you’d like to send a copy of the strategy you’re running, I can take a look and see if anything jumps out.

    To export a NinjaScript from NinjaTrader 7 do the following:
    From the Control Center window select File -> Utilities-> Export NinjaScript...
    Select the file in the left column then click “>”, then press export and name the file.
    Then attach that file you saved; under My Docs>NT8>Bin>Custom>Select the downloaded .zip file.

    Please let us know if you need further assistance.
    Alan P.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by manugarc, Today, 01:15 PM
    0 responses
    3 views
    0 likes
    Last Post manugarc  
    Started by JMont1, Today, 11:42 AM
    0 responses
    4 views
    0 likes
    Last Post JMont1
    by JMont1
     
    Started by Steve L, Yesterday, 10:04 PM
    0 responses
    4 views
    0 likes
    Last Post Steve L
    by Steve L
     
    Started by marianfed, Yesterday, 09:47 PM
    0 responses
    5 views
    0 likes
    Last Post marianfed  
    Started by hir04068, Yesterday, 09:29 PM
    0 responses
    8 views
    0 likes
    Last Post hir04068  
    Working...
    X