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 NullPointStrategies, Yesterday, 05:17 AM
    0 responses
    59 views
    0 likes
    Last Post NullPointStrategies  
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    133 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    73 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    45 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    50 views
    0 likes
    Last Post TheRealMorford  
    Working...
    X