hi
i am learning the code but i am having problems creating a back test which involves a loop within a loop.
i want to buy a stock on any or all of the following five days it drops below its price on the trigger day. So if my buy signal is triggered for a stock on 9/12 i want to buy it on 9/13, 9/14...9/18 if it is below a limit price.
any suggestions
thanks
Size:
Color:
Check out Strategy Window > Strategy Builder > MC, Multi-Condition Group in the WealthScript Programming Guide. By setting the "Lookback Period" to 5 in your Rule-based Strategy, your chosen buy condition can now last for 5 bars. After having finished building your Strategy, click "Open Code in new Strategy Window" to review the code behind it.
Size:
Color: