Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Need some help with compiling a strategy

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

    Need some help with compiling a strategy

    Hi,

    I'm trying to reference an indicator within a strategy that has values stored under the Variables section as a private double which are named line1Value, line2Value etc.

    I'm getting an error when I'm trying to compile the code as follows;

    No overload for method 'Number6' takes '0' arguments.

    Appreciate the help,
    suprsnipes

    #2
    suprsnipes, please post the exact call you use so we can take a look - if you want to access other internal values besides Plots, they would need to be exposed first properly -

    Comment


      #3
      Can you answer this question.

      The indicator I am referencing has default values and they are located in the Variables section.

      Under Initialize I have plots.

      Perhaps there is another way I can go about this...

      What would you suggest would be the best way to setup an indicator that can be referenced by a strategy in this way?

      Comment


        #4
        What exact values are you trying to access from the strategy? The values of the plotted series by the Indicator? Those could be accessed directly -

        Code:
         
        double myValue =  MACD(3, 30, 5).Diff[0];
        Giving you the current value of the MACD diff / histogram plot.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        56 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        143 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        276 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X