I have written a strategy for backtesting an intraday entry at market open - using the previous days close at 4:15
1. askForInput() is shown in the examples as to be placed under the premain function - if placed there it does nothing - it has to be placed before the premain function to be activated on attaching the strategy to the chart.
2, setPriceStudy(true) - should plot in the main price window but mine plots in a seperate window underneath - well it doesn't plot it just says Loading Data...
3. the premain statements such as setPriceStudy etc. colour bright blue when typed correctly - I have setColorPriceBars and setDefaultPriceBarColor but these dont color blue making me think they are incorrect but I can't see why.
4. The function parameter setLowerLimit and setUpperLimit don't work - when you enter numbers that exceed the limits they are accepted. The setName is supposed to give a meaningful title in the settings dialogue box isn't it - my dialogue boxes show the variable name in the FunctionParameter line and ignore the set name command.
5. What is the effect of putting the FunctionParameter names in the main() function arguments? I thought the variables did not need to be restated if called from FunctionParameter and included in the function Main argumetns but kept receiving error messages saying one of teh functions not defined. I checked the spelling then reversed the order of the argumetns and the error went away - when resetting them back to the old order the error did not come back - it was not a spelling error.
6. the debugPrintln lines at line 55 and 56 don't return any information - not sure if they are supposed to.
Anyway I can't get any output from the script so if anyone can help it would be great.
Thanks
1. askForInput() is shown in the examples as to be placed under the premain function - if placed there it does nothing - it has to be placed before the premain function to be activated on attaching the strategy to the chart.
2, setPriceStudy(true) - should plot in the main price window but mine plots in a seperate window underneath - well it doesn't plot it just says Loading Data...
3. the premain statements such as setPriceStudy etc. colour bright blue when typed correctly - I have setColorPriceBars and setDefaultPriceBarColor but these dont color blue making me think they are incorrect but I can't see why.
4. The function parameter setLowerLimit and setUpperLimit don't work - when you enter numbers that exceed the limits they are accepted. The setName is supposed to give a meaningful title in the settings dialogue box isn't it - my dialogue boxes show the variable name in the FunctionParameter line and ignore the set name command.
5. What is the effect of putting the FunctionParameter names in the main() function arguments? I thought the variables did not need to be restated if called from FunctionParameter and included in the function Main argumetns but kept receiving error messages saying one of teh functions not defined. I checked the spelling then reversed the order of the argumetns and the error went away - when resetting them back to the old order the error did not come back - it was not a spelling error.
6. the debugPrintln lines at line 55 and 56 don't return any information - not sure if they are supposed to.
Anyway I can't get any output from the script so if anyone can help it would be great.
Thanks
Comment