When my script loads, askForInput() is correctly popping up and letting me change parameters, and those parameters are being correcly applied.
My problem is that the entire script loads and may trigger a signal BEFORE askForInput() pops up. I was hoping the script wouldn't load and evaluate the current bar until askForInput() was done.
My question - is there some way to force a script to "wait" until I click OK on askForInput()?
For just triggering Alerts this isn't a problem, but for integrated trading it is. If I'm trading 4 markets with one script, I want to avoid 4 identical scripts with the only difference being exchange names and contract month/year.
My problem is that the entire script loads and may trigger a signal BEFORE askForInput() pops up. I was hoping the script wouldn't load and evaluate the current bar until askForInput() was done.
My question - is there some way to force a script to "wait" until I click OK on askForInput()?
For just triggering Alerts this isn't a problem, but for integrated trading it is. If I'm trading 4 markets with one script, I want to avoid 4 identical scripts with the only difference being exchange names and contract month/year.
Comment