![]() |
This website will be down for maintenance from Friday May 24th at 6PM MDT until Sunday May 26th at 12PM MDT. We apologize for the inconvenience. If you need assistance during this time, please email sales@ninjatrader.com
|
|||||||
| General Programming General NinjaScript programming questions. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
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 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,794
Thanks: 160
Thanked 568 times in 559 posts
|
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()
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
|
|
#3 |
|
Senior Member
Join Date: Mar 2012
Posts: 102
Thanks: 29
Thanked 4 times in 4 posts
|
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 |
|
|
|
|
|
#4 |
|
NinjaTrader Customer Service
Join Date: Apr 2010
Location: Denver, CO, USA
Posts: 4,794
Thanks: 160
Thanked 568 times in 559 posts
|
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.
Matthew
NinjaTrader Customer Service |
|
|
|
|
The following user says thank you to NinjaTrader_Matthew for this post: |
|
![]() |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Inputs for indicators | Radical | Indicator Development | 6 | 12-06-2011 02:11 PM |
| Inputs[1] | zeller4 | Indicator Development | 7 | 07-21-2011 10:29 AM |
| Arranging inputs | Hawk Arps | General Programming | 1 | 06-23-2011 10:46 AM |
| Inputs[] | MikeInMA | General Programming | 3 | 09-03-2010 09:02 AM |
| Too many inputs! | eDanny | Indicator Development | 6 | 07-25-2008 09:25 AM |