Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Strategy/Indicator Call Question

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

    Strategy/Indicator Call Question

    In my strategy i'm trying to call the AUADXVMA indicator trend variable. This is a private variable but I still think I should be able to call it without rewriting the code. All the other forums are asking similar questions but I still have not received the answer I need. See some of the code below.

    private AuADXVMA AuADXVMA1;
    AuADXVMA1 = AuADXVMA(25);

    protected override void OnBarUpdate()
    {
    if (CurrentBars[0] < 1)
    return;

    // Set 1
    (AuADXVMA1.trend[0] = 1)

    {
    EnterLong(Convert.ToInt32(DefaultQuantity), "");
    }
    }

    #2
    Hello Hruby,

    Thank you for your note.

    I don’t see any issue with the way you are writing the code, could you provide us with a copy of the strategy and indicator so we can test on our end?

    I look forward to your reply.
    Alan P.NinjaTrader Customer Service

    Comment


      #3
      Thanks AlanP for your quick response.

      I figured out I needed == signs for it to work.

      ie.
      (AuADXVMA1.trend[0] == 1)

      Thank you for the great support.

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Mindset, 04-21-2026, 06:46 AM
      0 responses
      89 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by M4ndoo, 04-20-2026, 05:21 PM
      0 responses
      135 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by M4ndoo, 04-19-2026, 05:54 PM
      0 responses
      68 views
      0 likes
      Last Post M4ndoo
      by M4ndoo
       
      Started by cmoran13, 04-16-2026, 01:02 PM
      0 responses
      119 views
      0 likes
      Last Post cmoran13  
      Started by PaulMohn, 04-10-2026, 11:11 AM
      0 responses
      69 views
      0 likes
      Last Post PaulMohn  
      Working...
      X