Construct an else statement that instructs to go long if the close is above the close five bars ago, and short if its below.
Use a block statement to exit short and long trades after 5 bars.
Code an else-if statement that will go long if the close is higher than the open, and short if the close isn’t higher than the open and it’s not Tuesday.
if close>open then buy next bar open
if dayofweek(date) <> 2 then sellshort next bar open;