Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

How to expose indicator values for strategies

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

    How to expose indicator values for strategies

    I wrote an indicator and I want to use it in a strategy. But when I go to the Strategy Wizard to create it and select my new indicator, I don't see any of the parameters to select. Do I have to have all parameters in the "Parameters" category to see them?

    Also, what "output" from my indicator will the strategy see? Do I have to make public variables or something for that? The output from my indicator will basically just be a "true" or "false" for each bar - signaling whether to open a new position or not.

    #2
    >> Do I have to have all parameters in the "Parameters" category to see them?
    yes

    I suggest creating an indicator by the indicator wizard to see how it all works. The "output" plot could hold 0 or 1 to indicate true or false

    Comment


      #3
      Originally posted by NinjaTrader_Dierk View Post
      >> Do I have to have all parameters in the "Parameters" category to see them?
      yes

      I suggest creating an indicator by the indicator wizard to see how it all works. The "output" plot could hold 0 or 1 to indicate true or false
      I don't know what you mean by 'how it all works', but I would like to use my indicator in a strategy and cannot see any of my parameters when I select it in the strategy.

      The indicator has no plots. It just uses DrawText to put a flag above bars that I want to begin a trade from. How do I set my parameters and expose that DrawText activity in an public variable that can be used by a strategy?

      Comment


        #4
        >> I don't know what you mean by 'how it all works'
        Please create an indicator by the wizard having one parameter and see how this parameter is exposed in the strategy wizard. Then check to see what code is generated for that parameter in the indicator NinjaScript and how could mimic that in your custom coded indicator.

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by CarlTrading, 03-31-2026, 09:41 PM
        1 response
        42 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 04-01-2026, 02:41 AM
        0 responses
        20 views
        0 likes
        Last Post CarlTrading  
        Started by CaptainJack, 03-31-2026, 11:44 PM
        0 responses
        29 views
        1 like
        Last Post CaptainJack  
        Started by CarlTrading, 03-30-2026, 11:51 AM
        0 responses
        46 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 03-30-2026, 11:48 AM
        0 responses
        38 views
        0 likes
        Last Post CarlTrading  
        Working...
        X