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 -- discounts are available after registering.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
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.
Can you help answer these questions from other members on NexusFi?
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.
I do need it down to the second, but nevertheless I greatly appreciate your taking the time and the effort to give me the response you did. I thank you for the privilege of your help.
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).
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.
Jay
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[0].ELTime + ((BarDateTime[0].Second)/60);
John
If marketposition=0 and time >= timetrigger_start then begin
Buy next bar at pricebreakup limit;
Sellshort next bar at pricebreakdown limit;
end;
If marketposition = 1 and time = timetrigger_end then begin
Sell next bar at market; end
Else if marketposition = -1 and time = timetrigger_end then begin
Buytocover next bar at market;
end;