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)
I'm working on a couple stop-and-reverse trading systems in ACSIL and need to figure out how to do a couple things with the code:
Exit all positions by RTH close (i.e. 3pm) or any set time
Not re-enter the market until after a set time (i.e. 5pm)
I think #2 will accomplish this but it also needs to not hold trades over weekends
I'd also like to be able to limit it to RTH only, but it's not really a priority right now. The main thing is to program it to be flat at RTH close and going into the weekends.
I've done some searches on SC and futures.io (formerly BMT) but haven't exactly hit upon what I'm looking for. If anyone can help with the syntax, I'd greatly appreciate the effort.
I'm still VERY new to ACSIL so while stuff like this may be a breeze to others I often have no idea how to codify the concept or action I'm attempting to program. Baby steps
Edit: fwiw, I did post a similar question on SC a month or so ago. SC did reply, but I'm thinking they thought they were responding to a seasoned ACSIL vet. I am not that guy
Luck is what happens when preparation meets opportunity. ~ Seneca
Can you help answer these questions from other members on NexusFi?
I can try to help, can you post the link to your original question on the SC forum? When the strat restarts at 5:00 p.m. will it be starting fresh or resuming previous logic, e.g. reopen 4 units that were closed at 3:00 p.m. and continue trading them?
Also, if you haven't used the spreadsheet for trading studies, then I highly recommend it. Right now I am doing all of my development with them because 1) I can directly see the results of my formulas and the flow of the trading logic which makes the whole process faster and easier, 2) it is easy to create and plot an equity curve on my charts so I don't even have perform backtesting or run a replay, just simply pull up a chart and there it is, 3) I can quickly and easily dump the equity figures or other study data/stats into excel for further analysis.
The following user says Thank You to vegasfoster for this post:
Excellent question. Ideally, I'd like to actually incorporate that as an option: resume or start fresh. If pressed to pick between the two, I'd say starting fresh.
Excellent suggestion and ideas. I had mostly been leaning on spreadsheets, but decided it would be worthwhile to start getting into ACSIL given its powerful combination of flexibility and efficiency. This became very noticeable when it came to backtesting: what can literally take hours to backtest via spreadsheet trading system can be done in minutes, sometimes seconds, via ACSIL.
Also, I have to admit that it's been real hit-or-miss for me when it comes to getting spreadsheet trading systems to behave as expected. I'm not opposed to using spreadsheets, it's just that ACSIL has actually been a better experience for me. And I need all the help I can get from these things
Thanks again for checking out the scenario and for your suggestions.
Luck is what happens when preparation meets opportunity. ~ Seneca
Try adding this to your code for a clean start at. End Time would be 3:00 p.m. and Start Time would be 5:00 p.m. Haven't tested, so let me know if you have issues.
The following user says Thank You to vegasfoster for this post: