could anyone help me on how to do an intra bar code for opening a breakout order a certain number of pips above/below current market price 3 seconds before a particular established time in TradeStation Easy language? I would be greatful, thank you in advance.
I'm assuming you want a breakout bracket (with a buy and a sell order that cancels). I've included the code for minute resolution. As far as getting down to the second resolution, you'll need some help from there (I dunno). The inputs include the time at 10:00 a.m. and a number of ticks at 3.
To best of my knowledge, TradeStation doesn't support resolution more granular than 1 minute. MultiCharts does, if this is a requirement you might check it out.
One possible work around is to track when a new minute bar forms, then concurrently start tracking your local computer time from tick to tick so that you could trigger something at 57 seconds (3 seconds prior to the next minute bar).
Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.
Need help? 1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first. 2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses. 3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make. 4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance. 5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers. 6) Help using the forum? Watch this video to learn general tips on using the site.
If you want to support our community, become an Elite Member.
The following user says Thank You to Big Mike for this post:
Mike, that is an excellent suggestion and might be the answer. I still think the process can be programeded in T.S. Easy language or in thinking out loud to myself if needed in C++ that T.S. also accepts now. That said you may have the best solution and will put that at the top of the list for now. I am very greatful for the time others offer to help.
In TradeStation, you can get the current time in minutes an seconds with the BarDateTime function. For example, to determine the time of the current bar, you can use
CurrentBarTime = BarDateTime.ELTime + ((BarDateTime.Second)/60);