The above line of code will set our counter to zero when the date on the previous bar is different than the current bar. This can be done by incrementing a variable every time your strategy opens a trade. We simply wish to track each new position. What if you wish to limit the number of trades over a given week? Nope, can’t do it with EnteriesToday. This works fine in many cases, but what if you wish to limit the number of trades in the overnight session? EnteriesToday assumes the regular session and will reset the trade counter when the day changes – right in the middle of your trading. The code I’m going to write will be a more flexible method than the built-in TradeStation reserved word, EnteriesToday. Once it reaches that number, you wish the strategy to not open any more trades until the next trading day. For example, you may want your day trading strategy to only take a maximum of 20 trades per day. Most often this is done to limit the number of trades a strategy will open in a single day. In this article I’m going to demonstrate an EasyLanguage technique to limit the number of trades your trading system will take within a given period.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |