What if you wish to limit the number of trades over a given week? Nope, can’t do it with EnteriesToday. We simply wish to track each new position. This can be done by incrementing a variable every time your strategy opens a trade. The above line of code will set our counter to zero when the date on the previous bar is different than the current bar. Keep in mind, this code we’re writing is for intra-day trading! Thus, when the previous bar has a different date than the current bar we must have entered a new day.īut what if we want to reset our counter at a different time? For example, if we wish to reset our counter at the close of the U.S.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |