Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Bollinger on Series - BUG?

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

    Bollinger on Series - BUG?

    Hi

    Here is my code ... it is simple but I am getting the errors
    13/01/2012 20:40:46|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:40:47|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:41:29|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:42:35|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:45:24|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:46:05|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:49:41|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.
    13/01/2012 20:51:09|3|4|Error on setting indicator plot for indicator 'volumeClassify'. Value outside of valid range.


    Is ther a bug in bollinger? This works for some instruments and not other .. works for USDCHF but not EURUSD

    Thanks

    ================================================== =====


    protected override void Initialize()
    {
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Orange),1), PlotStyle.Line, "IExtremelyHigh"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Green),1), PlotStyle.Line, "IVeryHigh"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.DarkViolet),1) , PlotStyle.Line, "IHigh"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Firebrick),3), PlotStyle.Line, "IAverage"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.DarkViolet),1) ,PlotStyle.Line,"ILow"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Green),1),Plot Style.Line,"IVeryLow"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Orange),1),Plo tStyle.Line,"IExtremelyLow"));
    Add(new Plot(new Pen(Color.FromKnownColor(KnownColor.Blue),3),PlotS tyle.Block,"IVolume"));

    Overlay = false;
    BarsRequired = averageLength*2;
    CalculateOnBarClose = true;

    logVolume = new DataSeries(this,MaximumBarsLookBack.Infinite);

    }

    /// <summary>
    /// Called on each bar update event (incoming tick)
    /// </summary>
    protected override void OnBarUpdate()
    {

    if (CurrentBar < averageLength) return;

    IVolume.Set(Math.Log(Volume[0]));

    logVolume.Set(Math.Log(Volume[0]));

    //IExtremelyHigh.Set(Bollinger(logVolume,3,averageLe ngth).Upper[0]);
    //IVeryHigh.Set(Bollinger(logVolume,2,averageLength) .Upper[0]);
    //IHigh.Set(Bollinger(logVolume,1,averageLength).Upp er[0]);

    IAverage.Set(Bollinger(logVolume,1,averageLength). Middle[0]);

    //IExtremelyLow.Set(Bollinger(logVolume,3,averageLen gth).Lower[0]);
    //IVeryLow.Set(Bollinger(logVolume,2,averageLength). Lower[0]);
    // ILow.Set(Bollinger(logVolume,1,averageLength).Lowe r[0]);

    }

    #2
    Hello murfinp,
    Thanks for your post and I am happy to assist you.

    Can you provide the cs file. You can find the same at <Documents>\NinjaTrader 7\bin\Custom\Indicator\ folder. Also what setting you are using so that I can replicate the issue at my end.

    I look forward assisting you further.
    JoydeepNinjaTrader Customer Service

    Comment


      #3
      Hi

      Dont worry i wrote my stddev function and it fixed it .. i suspect you may have a bug in bollinger if u suply your own data series .. i was using my.series.set(Math.log(Volume[0]));
      Thanks anyway
      Paul

      Comment


        #4
        Hello Paul,
        Glad you could figure out the issue.

        Please do let me know if I could assist you any further.
        JoydeepNinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by terkk, Today, 01:16 PM
        2 responses
        17 views
        0 likes
        Last Post desjaimz  
        Started by TraderElegante, Today, 12:14 PM
        1 response
        19 views
        0 likes
        Last Post NinjaTrader_PaulH  
        Started by dgee949, Today, 11:44 AM
        1 response
        14 views
        0 likes
        Last Post NinjaTrader_JustinD  
        Started by NinjaTrader_Kate, Today, 12:01 PM
        0 responses
        20 views
        0 likes
        Last Post NinjaTrader_Kate  
        Started by efeuvejota01, Today, 11:42 AM
        4 responses
        37 views
        0 likes
        Last Post efeuvejota01  
        Working...
        X