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 cmoran13, Yesterday, 01:02 PM
        0 responses
        29 views
        0 likes
        Last Post cmoran13  
        Started by PaulMohn, 04-10-2026, 11:11 AM
        0 responses
        21 views
        0 likes
        Last Post PaulMohn  
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        160 views
        1 like
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        95 views
        1 like
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        148 views
        2 likes
        Last Post CaptainJack  
        Working...
        X