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 CarlTrading, 03-31-2026, 09:41 PM
        1 response
        57 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        30 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        41 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        58 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        47 views
        0 likes
        Last Post CarlTrading  
        Working...
        X