I want to plot the high and low for the last 24 bar with an inner high line 20 pips below the high and an inner low line 20 pips above the low. Then I want to create a true false so I can create an alert in market analyzer if any of the following conditions is true,
1. the high of the previous bar crossed the inner high line,
2. the high of the previous bar crossed the high line,
3. the low of the previous bar crossed the inner low line,
4. the low of the previous bar crossed the low line,
5. the high of the previous bar crossed above the inner high line and current bar closes down,
6. the high of the previous bar crossed above the high line and current bar closes down,
7. the low of the previous bar crossed below the inner low line and current bar closes up,
8. the low of the previous bar crossed below the low line and current bar closes up.
1 to 4 are the setup and 5 to 8 is the confirmation.
Comment