Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Create Draw Fib using Button

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

    Create Draw Fib using Button

    I have code where I create a Fib retracement it works in on bar update, I created a method to create the fib and then copied to run on button press, The button does execute but Throws an unhandled exception index out of range on creating the FIB, I have tried to revert to the documentation method. I have created the fib object outside of the button action My guess is it must need an event handler. I wish to use a scalping method and want the Fib and order placed based on said fib.

    I am using the documentation

    // Instantiate a FibonacciRetracements object
    FibonacciRetracements myFibRet = Draw.FibonacciRet racements(this, "tag1", true, 10, Low[10], 0, High[0]);

    // Set the object's lines to extend to the right
    myFibRet.IsExtendedLinesRight = true;

    #2
    Hello BartMan,

    TriggerCustomEvent() must be used to synchronize series from a non-data-driven thread.


    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank You!

      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