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 am trying to create the script in Tradestation for trading the 1200 noon bar, so if the price exceeds the high by .01 points or low .01 points a trade is triggered.
I have tried many scripts which reference a time but they are not using the high and low of the 1200 bar unless the trigger time is 1230. If the time is 1330 and there is a breakout it references the 1300 bar not the 1200 bar. What I am trying to do is use the 1200 bar as a static bar so if there is a breakout at 3:30 it must use the high +.01 or the low-.01 of the 1200 bar to trigger the signal.
I have tried for days to accomplish this and looked at examples in this forum which I adjusted, but it is still incorrect.
Thankyou to everyone who reads this.
Can you help answer these questions from other members on NexusFi?
Here is a line of code for an EasyLanguage entry at noon for the prior high +.01.
It assumes you are using 60 minute bars. Easy language will only trade on the "next bar". So this code activates on the 11:00 bar, but doesn't enter the trade until noon.
If time=1100 Then buy ("Noon_Breakout") 1 contracts next bar at high+.01 limit;
Please ask more questions if this type of code is not what you are looking for.
depending on the time frame you can store the high and low of a specific bar inside variables and then use these variables later. If you have two variables called vHigh and vLow you could for example store values at 1200 like this (under the condition that you have bars with this timestamp):
Thankyou for your reply and your time. Close but still off a bit. It will only buy at 1300 and nothing after. If it is 1500 it will not enter the trade.
vars: high_at_noon(0), low_at_noon(0);
if time = 1200 then begin
high_at_noon = High;
low_at_noon = Low;
end;
if time > 1200 then begin
buy next bar at high_at_noon + 0.01 stop;
sellshort next bar at low_at_noon - 0.01 stop;
end;
I just figured it out. Thankyou very much for your time !
A good way to pay back your thanks is to post your final code, so that others who are struggling (in the future) with a similar problem may know the final solution.