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