Start/End time and exit open positions help!

Questions about MultiCharts and user contributed studies.
AlgoTrader77
Posts: 2
Joined: 16 Jul 2020

Start/End time and exit open positions help!

Postby AlgoTrader77 » 16 Jul 2020

Spent the last 7 months building an auto trader that is working exactly to my specifications.

BUT… I am at a complete loss as to how to write this last piece. My brain has reached its limits on solutions! Ahhhh! :cry:

This should be the easiest thing to do but I can't figure it out. I have tried all of the solutions from this forum on this topic to no avail. At least the ones I could find that had anything to do with this.

This is what I am trying to do:
(Note: trading futures, times are US Chicago)

Begin trading at 17:00 (i.e. start algo)
Liquidate any open position(s) and stop trading at 15:14

That’s it! I just want it to start when Globex opens and shut off a minute prior to the RTH close and close any open positions... and I can’t for the life of me find a way to do this.

Please help if you know how to write this.

Thank you!!

User avatar
TJ
Posts: 7742
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2222 times

Re: Start/End time and exit open positions help!

Postby TJ » 16 Jul 2020

What is your chart resolution?

AlgoTrader77
Posts: 2
Joined: 16 Jul 2020

Re: Start/End time and exit open positions help!

Postby AlgoTrader77 » 16 Jul 2020

I run this on a 1 tick chart.


Return to “MultiCharts”