/*[[ Name := Weekend_Bar_Hunter Author := Copyright © 2005, David W Honeywell Link := DavidHon@msn.com Separate Window := No First Color := Blue First Draw Type := Symbol First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Symbol Second Symbol := 218 ]]*/ Variable : shift(0); SetLoopCount(0); // loop from 17 bar to current bar (with shift=0) For shift = 17 Downto 0 Begin //------------- Day Of Week 1 ---------------------------------------------------- // Sunday If (DayOfWeek == 1) then { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Current Bar Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } //------------- Day Of Week 2 ---------------------------------------------------- // Monday If (DayOfWeek == 2) then { If Time[1] != (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 1 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } If Time[1] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[6] != (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 6 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } If Time[1] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[6] == (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { If Time[11] != (Time[0] - 1382400) then // minus 16 days , ((24*60)*60)*16 = 1382400 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 11 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } } } //------------- Day Of Week 3 ---------------------------------------------------- // Tuesday If (DayOfWeek == 3) then { If Time[2] != (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 2 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } If Time[2] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[7] != (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 7 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } If Time[2] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[7] == (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { If Time[12] != (Time[0] - 1382400) then // minus 16 days , ((24*60)*60)*16 = 1382400 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 12 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } } } //------------- Day Of Week 4 ---------------------------------------------------- // Wednesday If (DayOfWeek == 4) then { If Time[3] != (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 3 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } If Time[3] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[8] != (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 8 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } If Time[3] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[8] == (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { If Time[13] != (Time[0] - 1382400) then // minus 16 days , ((24*60)*60)*16 = 1382400 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 13 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } } } //------------- Day Of Week 5 ---------------------------------------------------- // Thursday If (DayOfWeek == 5) then { If Time[4] != (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 4 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } If Time[4] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[9] != (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 9 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } If Time[4] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[9] == (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { If Time[14] != (Time[0] - 1382400) then // minus 16 days , ((24*60)*60)*16 = 1382400 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 14 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } } } //------------- Day Of Week 6 ---------------------------------------------------- // Friday If (DayOfWeek == 6) then { If Time[5] != (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 5 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } If Time[5] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[10] != (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 10 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } If Time[5] == (Time[0] - 172800) then // minus 2 days , ((24*60)*60)*2 = 172800 { If Time[10] == (Time[0] - 777600) then // minus 9 days , ((24*60)*60)*9 = 777600 { If Time[15] != (Time[0] - 1382400) then // minus 16 days , ((24*60)*60)*16 = 1382400 { Comment("\n", "\n","Trading Has Been Suspended", "\n", "\n","Bar [ 15 ] Must Be Deleted From ",Symbol); SetIndexValue(shift, High+20*Point); SetIndexValue2(shift, Low-20*Point); } } } } End;