I am a newbie and testing a simple strategy which is based on # of days consecutive up/down on SMA: long and hold pos if SMA is up and switch to short after SMA is down # days. This can be built easily in the Builder for a single open pos, however I note the reversal trade is not on the same day. Instead it is entered on the next day. Intention is to reverse on the same bar. How can it be done in the Builder?? Thanks for any advice.
Below is full code from Builder.
CODE:
Please log in to see this code.
Size:
Color:
Size:
Color:
Hi:
Sorry forget to mention that selecting "Multiple open positions allowed" will not work on this test strategy b/c it will generate many trades as there are many cases where SMA is up or down consecutively. The strategy only switches long when having 5 conse. downs or short when having 5 conse. ups.
Any chance to restore SAR as a default setting to the Builder since many people are asking such? Or any easy way to modify the code to achieve the same outcome. Thanks.
Size:
Color:
QUOTE:
Or any easy way to modify the code to achieve the same outcome.
Here you go:
CODE:
Please log in to see this code.
Size:
Color:
Thanks. It works.
Another question: I tested it with $10,000 or $100,000 in portfolio mode with 100% equity, the results are comparable with all trades included. Yet when I used $1,000,000 capital, the 3rd trade is not included due to insufficient simulated capital (strategy lost 8% in the first two trades). I do not see how $1mm is not enough capital vs $10k or $100k. Do I miss something obvious? Please advise.
Size:
Color:
See Strategy Window > Backtesting Strategies > 100% of Equity Sizing in the User Guide.
Size:
Color: