Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
So I exited my short positions on the re-open of the market, but had to do it manually. I added the SetExitOnClose to my strategy, but it didn't do anything. I think it was my mistake, in that I added it after 1600 ET, so the strategy was not re-evaluated until after the bar was closed. I will try again tomorrow with a position and see how it works.
So I hit my goal of getting my sim balance back to $16k:
This is what the chart looked like:
One good move, that was all that happened and all I needed. Now I'm not too concerned with that balance, as I will be using the sim account for some other testing, such as the exit on close mentioned above.
Sorry, I totally missed your response last week. Yeah, I tried pretty much everything (Trade Bar, Chart Trading), no luck. The forums did not help, but @kevinkdog helped me by posting a request on the forum.
The price on the front month char shows .0025 increments, and later months at .005. It is not a data or chart issue. I'm guessing a bug.
Don't waste your time testing setexitonclose. It works just fine in backtest, but will NEVER work in real trading (unless you are using custom sessions).
The reason?
Your chart gets notified when a session ends, and that is the last tick of the day. When that happens, setexitonclose says "oh it is the end of the day, I should sent my order to close."
Of course, it dutifully sends its order, but guess what? It is rejected because the market is closed!
Pretty silly, right? But that is what happens.
Your best bet is to use a time based exit (if you are using minute bars), or a custom session that ends a few minutes before the exchange closes (again for minute bars. With a custom session, set exit on close will actually work).
It goes back to the days when Tradestation first started, and backtesting (not automated live trading) was all there was. At that time "setexitonclose" was great for backtesting.
Now, it is only good with custom sessions.
I have found, however, that it is a great litmus test for trading "educators." I have seen quite a few show daily charts that use setexitonclose, and of course their results look great. Them doing that is a dead giveaway - they don't trade it live!
Well, I didn't post anything yesterday for a few reasons. I am fighting a cold (I'm winning), so I'm really just tired ("don't trade tired or sick".....Kleinman) and not terribly productive. The other reason is that my strategy, as of right now, has not produced any new trades (Eurodollar March 2020 contract, 60 minute).
I did have one signal for a short position, but the limit price was never hit, so no entry. I'm glad both sim and my strategy report are in agreement. Here is what the last two days look like:
Other than that, it has been a good day. Sometimes my wife/trading partner and I will go for a walk to discuss where we are with trading strategy development, markets, etc. We get some physical activity and get some work done at the same time. The big topic today was the book, Building Winning Algorithmic Trading Systems. She finished reading it Tuesday and found it to be a wake-up call, I believe. We both realize that we need to formalize our strategy development process, and the book provides a pretty good process for strategy building, testing and deployment (or binning if a strategy does not pass all tests).
I have been thinking about the processes in the book. The process is similar to SDLC (software development life cycle), so it is a familiar and comfortable process for me. Isn't algorithmic strategy development essentially software development at it's core? I want to expand on Davey's process and create a full blown process diagram. I probably won't be able to get to that until January at the earliest, due to current time constraints.
Along with that thought, one of my goals for our little trading organization is to formalize a lot of our processes, in particular cataloging strategies, entries, exits, functions, etc. We have been winging it for a long time and it is really not sustainable. This is the horrible part of system trading development that not many developer's enjoy doing, but is very important. We have all sorts of strategies, ideas, custom functions, and random code floating all over the place. It is a hot mess. The main point here is our need for discipline. To quote Aristotle, "Through discipline comes freedom", or as Jocko Willink paraphrases, "Discipline = Freedom".
I could write a book chapter on this subject, so I will just stop myself here.
This is kind of funny, but not in a good way. The Dictionary makes it seem like you can still use it, but if you look at the related built-in strategy, Close at End of Day this what they state:
Funny, because the only thing in this strategy is SetExitOnClose. I'm not sure which is more accurate, the strategy or the Dictionary.
I guess someone thought it was a good idea at some point, but even for backtesting I can see it giving wildly weird backtesting results.
Well, I figured I should share this, since I've been writing about EOD exits. This is a simplified version of my solution (my solution is a little more elegant and efficient). It works on the 60 minute chart and Eurodollar, for now, but as someone pointed out to me it will not work on different timeframes/market close combinations (e.g. ES 10 minute chart with a 1615 market close). I'll have to puzzle that through when I need it for those markets.
Here is the logic in pseudocode:
If the current time = start of last bar
and I'm in a position
and the EOD exit flag is set to 'yes'
then buy-to-cover or sell all contracts
If you code in Tradestation, maybe you will find this useful:
I think this might work in Multicharts, though you will want to check the functions to be sure. I hope you find this useful.
I just finished reading Building Winning Algorithmic Trading Systems. Rather than bore you with the details, I just put it over in the Highly Recommended Books thread:
The latest book that I recommend is: Building Winning Algorithmic Trading Systems, by Kevin Davey
I just finished reading it this morning and did not want to pass judgement until I finished. This book is honest, well written and edited, and relatable. …
Let's just say I recommend it and there is a little something in there for discretionary traders, too. I would say that this is a must have for algo traders. Just sayin'.
Now I have to work on a task for my partner, coding something or another.
Well, this week has been wildly boring for my strategy. It has been very quiet, with no trades over the past 3 days. I won't bore you with the chart.
Right now I am working through a lot of backlog and am in the process of upgrading some systems (NAS, etc.), so I have not had a lot of time to dedicate to trading today. I am sorting through some of the content for my upcoming Strategy Factory course in late January. I am really excited about it.
It is wine o'clock, so I'm going to empty the dishwasher and be domestic. I hope you all had a great week and I'll see you on the other side (of the weekend, that is).