[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Need help - Alternate explan. of code problem



PureBytes Links

Trading Reference Links

o-list:

I'm trying to find a way to code a system such that if conditions for a buy occur on a particular bar, then if on the next bar the high of the previous bar is taken out the system goes long immediately without waiting for close. 

Everything is reversed for sells. Trouble is I'm having trouble getting the system to check the <next bar> to see if it takes out the high of the previous bar which the original conditions were met upon. 
As you can see I typed "next bar" in my code were it will not verify (but where you can see what I want to do). Also, "immediately" is not a word recognized by easy langauge.



If Condition1 and H next bar >= H[1] + X points then buy immediately; 
If Condition2 then buy;
If Condition3 and L next bar <= L[1] - Z points then sell immediately;
If Condition4 then sell;

I am aware that condition2 and condition4 will only enter at the close of the bar. I tried using buy 375 limit and sell 375 limit, but I still got all entries at the close of the bar, no entries showing intrabar.
 I also tried this:

If Condition1 and H[0] >= H[1] + X points then buy immediately; 
If Condition2 then buy;
If Condition3 and L[0] <= L[1] - Z points then sell immediately;
If Condition4 then sell;


Frank