Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Expression codes

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

    Expression codes

    I have a custom indicator on my chart that stores it"s structure in a separate data base and it creates Expression codes, when 'True'.
    When trying to build a strategy in strategy wizard, I load indicator "expression code" in left column of condition builder to a constant value right column.

    The problem is the plot on chart, True or False, my indicator can only have one indicator (data base) loaded on a chart.

    If "plot on chart=False" strategy will not turn on, if "plot on chart=True" strategy will turn on but can only run if I remove indicator loaded on my chart.

    Now strategy turns on but sees and empty data base, no Expressions available.
    I need strategy to receive the expressions from the indicator loaded on my chart before strategy is turned on.
    Is there a way to customize strategy wizard to receive the expressions with "plot on chart=False"? Possibly there's another way to look at this problem?

    Thank you for any input.

    #2
    Hello Gravity,

    Using Expression Trees is outside of the realm of support and I will not be able to assist with this.
    https://msdn.microsoft.com/en-us/library/mt654263.aspx

    This thread will remain open for any community members that would like to assist with using this.

    However, you mention that if Plot on chart is set to true, the script works, and when false it does not work.

    When false and the script does not run, are you receiving any error messages in the Log tab of the Control Center?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Thank for your reply,

      Yes I do receive an error msg:

      "Object reference not set to an instance of an object"

      Thanks
      Jim

      Comment


        #4
        Hello Jim,

        The error is letting you know that an object is being called before it has been set to a value.

        Have you added any prints to your code to find out which object is causing the error?
        Chelsea B.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X