Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

'Fibonacci pivots' error.

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

    'Fibonacci pivots' error.

    'Fibonacci pivots' tried to load additional data. All data must first be loaded by the hosting NijaScript in its confiture state. Attempted to load ... Default: Daily

    Where am I going wrong here? If I remove these two lines of code from my script, it works.

    Code:
    private FibonacciPivots _weelyPivots;
    
    else if (State == State.Configure)
    {[INDENT]AddDataSeries(Data.BarsPeriodType.Day, 1);[/INDENT]
     }
    else if (State == State.DataLoaded)
    {[INDENT]_weelyPivots = FibonacciPivots(PivotRange.Weekly, HLCCalculationMode.DailyBars, 0, 0, 0, 1);[/INDENT]
     }

    #2
    Hello Herrwolf1,

    Thanks for your post.

    It appears you have everything added as needed. Could you confirm that you have recompiled the script and have also removed and re-added the script to ensure that it properly goes through its lifecycle?

    You can test the snippet below, which is working on my end.

    Code:
    private FibonacciPivots FibonacciPivots1;
    
            protected override void OnStateChange()
            {
                if (State == State.SetDefaults)
                {
                    Description                                    = @"Enter the description for your new custom Indicator here.";
                    Name                                        = "FibPivotTest";
                    Calculate                                    = Calculate.OnBarClose;
                    IsOverlay                                    = false;
                    DisplayInDataBox                            = true;
                    DrawOnPricePanel                            = true;
                    DrawHorizontalGridLines                        = true;
                    DrawVerticalGridLines                        = true;
                    PaintPriceMarkers                            = true;
                    ScaleJustification                            = NinjaTrader.Gui.Chart.ScaleJustification.Right;
                    //Disable this property if your indicator requires custom values that cumulate with each new market data event. 
                    //See Help Guide for additional information.
                    IsSuspendedWhileInactive                    = true;
                }
                else if (State == State.Configure)
                {
                    AddDataSeries(Data.BarsPeriodType.Day, 1);
                }
                else if (State == State.DataLoaded)
                {                
                    FibonacciPivots1                = FibonacciPivots(Close, PivotRange.Weekly, HLCCalculationMode.DailyBars, 0, 0, 0, 20);
                }
            }
    I look forward to being of further assistance.

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by CarlTrading, 03-31-2026, 09:41 PM
    1 response
    45 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by CarlTrading, 04-01-2026, 02:41 AM
    0 responses
    21 views
    0 likes
    Last Post CarlTrading  
    Started by CaptainJack, 03-31-2026, 11:44 PM
    0 responses
    31 views
    1 like
    Last Post CaptainJack  
    Started by CarlTrading, 03-30-2026, 11:51 AM
    0 responses
    50 views
    0 likes
    Last Post CarlTrading  
    Started by CarlTrading, 03-30-2026, 11:48 AM
    0 responses
    42 views
    0 likes
    Last Post CarlTrading  
    Working...
    X