Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

The use of inputs

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

    The use of inputs

    I want to have user inputs in a strategy. I would like the user to communicate with the program at his option. For example, let's say that the program is putting diamonds on a chart. Suppose the user doesn't want any more diamonds being placed on the chart. So, the user clicks on the chart and selects 'Strategies'. He selects his strategy then places an entry in an input. The software will interpret this in such a way as to prevent diamonds from being drawn on the chart. At a later time, the user enters into the input and the diamonds now begin appeariung again. Like a toggle.

    I tried to use the default myInput0 and change its value within the program.
    myInput0=8; When another bar formed I checked the input value from the chart. It didn't change to 8 until I highlighted the strategy. However, I cannot enter another number into the input. It is locked out.

    Suggestions?

    Thank you...

    #2
    Duke,

    I'd suggest using Boolean methods which can be set to True or False.

    if(ShowDiamonds == true)
    //logic w/ DrawDiamonds()

    if(ShowDiamonds == false)
    //logic w/o DrawDiamonds()
    MatthewNinjaTrader Product Management

    Comment


      #3
      Matthew,
      After the strategy is up and running can I click on the chart and select the strategy then change the inputs and have the software react to this on an interactive basis without stopping the processing within the software?
      Duke

      Comment


        #4
        You cannot change a strategy parameter on a running strategy.

        You can do this on an indicator, but for a strategy you would need to disable and then re-enable the strategy.
        MatthewNinjaTrader Product Management

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by Aviram Y, Today, 05:29 AM
        0 responses
        1 view
        0 likes
        Last Post Aviram Y  
        Started by quantismo, 04-17-2024, 05:13 PM
        3 responses
        25 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by ScottWalsh, 04-16-2024, 04:29 PM
        7 responses
        34 views
        0 likes
        Last Post NinjaTrader_Gaby  
        Started by cls71, Today, 04:45 AM
        0 responses
        6 views
        0 likes
        Last Post cls71
        by cls71
         
        Started by mjairg, 07-20-2023, 11:57 PM
        3 responses
        216 views
        1 like
        Last Post PaulMohn  
        Working...
        X