|
|
“Initial Balance” Rotation Strategy: Part 7 – Trade Frequency(This is a continuation in our blog series on creating a trading system from start to finish. Want to see more? Click here for our main RTL support page, which links to all the articles in this series and many more tutorials. Questions? Click here for the RTL Community Forum where you can get help on your programming.) When you consider the system we have built thus far, it is apparent that once a position exits for a profit target, the system may still enter the same trade again on the same day, as we have not created any RTL code that would suggest otherwise. Just because you get your profit does not mean the market will not return to your entry level. Currently, the system enters the trade again. Many traders may not wish to enter the trade again, although in some cases it might actually be effective in overall backtests. You may wish to test both scenarios. Consider this trade, created from the backtest. Here I have changed the profit to just 1 point to make it easier to identify: So, how to limit the system from only taking one trade per day? Backtests often require rules that do not actually take actions, but instead set a framework for managing the system. This will be an important part of optimization, which is the subject of a future article. We can create a rule at the beginning of our trading rules list that is processed at the beginning of every bar, before any other rules are studied. This introduces some new RTL techniques and tokens:
Here is our “Main” Rule: Note that a semicolon is required to separate multiple lines inside a single trading rule. The symbol “!=” means “not equal.” Now, we have to alter our entry rules to consider the current value of V#2 before taking the trade: All you have to do is add “AND V#2=0″ to the end of each entry rule so it will not execute unless no other trade has occurred during the day, as per our Main Rule. Here is our long rule now: SET(V#1,(SESST_LOW – (SESST – SESST_LOW))) AND LO <=V#1 AND TIME >1030 AND TIME < 1500 AND V#2=0 Once you make these changes to the long and short entries, and add the Main Rule, you’ll see that the same chart signal shown above now looks like this: If you run a backtest for the same 250-day period using this tweak of limiting the trade once per day, you will see that we have further improved our net profits over this time, by limiting trades to once per day, and taking a 5-point profit target or end-of-day exit: As we will discover next time, you need to consider these limits in strategies that incorporate a stop loss; after all, you don’t want to get in immediately after you are stopped out! We will discuss stop loss rules in the next article. 0 Responses to “Initial Balance” Rotation Strategy: Part 7 – Trade Frequency
No comments. Add a Comment |





