#
A
B
C
D
E
F
G
H
I
J
K
L
M
N
O
P
Q
R
S
T
U
V
W
X
Y
Z
Home
Forex Forum
+ Add Script
Metastock
Expert Advisors
Explorations
Indicators
Trading Systems
Metatrader
MQL Experts
MQL Indicators
MQ4 Experts
MQ4 Indicators
MQ4 Scripts
Tradestation
Functions
Indicators
PaintBars
ShowMe
Trading Systems
Amibroker
Commentaries
Explorations
Functions
Indicators
Trading Systems
Contact us
Newsletter
Group: Metatrader MQL Indicators
Title: HighLowTestAuto
Description:
HighLowTestAuto
/*[[ Name := Author := Link := Notes := Separate Window := No First Color := Magenta First Draw Type := Line First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Line Second Symbol := 218 ]]*/ Var:cnt(0),Flag3(0),Level13(0),Level14(0),Level15(0),Level16(0),Level17(0),Level18(0); Var:bars_from_now_7_10(0); Input:Spread(5), //ReCalculate(0), //High1to6(0), // Level13, //Low1to6(0), // Level14 //High1to8(0), // Level15 //Low1to8(0), //Level16 //High7to10(0), //level17 //Low7to10(0), //level18 bars_from_now(0), Alert13(1), Alert14(1), Alert15(1), Alert16(1), Alert17(1), Alert18(1), Color13(Red),Thik13(3), Color14(Red),Thik14(3), Color15(Limegreen),Thik15(3), Color16(Limegreen),Thik16(3), Color17(Pink),Thik17(3), Color18(Pink),Thik18(3); bars_from_now_7_10 = bars_from_now - 6; level13=highest(mode_high, bars_from_now, 6); //High1to6; level14= lowest(mode_low, bars_from_now, 6); //Low1to6; level15=highest(mode_high, bars_from_now, 8); //High1to8; level16=lowest(mode_low, bars_from_now, 8); //Low1to8; level17=highest(mode_high, bars_from_now_7_10, 4); //High7to10; level18=lowest(mode_low, bars_from_now_7_10, 4); //Low7to10; for cnt = bars downto 0 { SetIndexValue(cnt, 0); SetIndexValue2(cnt, 0); }; //If ReCalculate < 1 or ReCalculate > 1 then exit; If Level13<>0 then begin //MoveObject("Level13",OBJ_TRENDLINE,CurTime,Level13,CurTime,Level13,Color13,Thik13,STYLE_SOLID); MoveObject("Level13",OBJ_HLINE,CurTime,Level13,CurTime,Level13,Color13,Thik13,STYLE_SOLID); SetObjectText("Level13_txt","HIGH 1 to 6 -"+NumberToStr(Level13,4)+" ","Arial",8,Color13); MoveObject("Level13_txt",OBJ_TEXT,time[10],Level13,time[10],Level13,Color13); If Alert13=1 and Level13-Spread/2*Point
60 then begin Alert(" || Level 13 reached= ",Level13,Symbol, "at", curtime, " || "); Flag3=CurTime; end; end; If Level14<>0 then begin MoveObject("Level14",OBJ_HLINE,CurTime,"",CurTime,Level14,Color14,Thik14,STYLE_SOLID); // MoveObject("Level14",OBJ_HLINE,CurTime,Level14,CurTime,Level14,Color14,Thik14,STYLE_SOLID); SetObjectText("Level14_txt","LOW 1 to 6 -"+NumberToStr(Level14,4)+" ","Arial",8,Color14); MoveObject("Level14_txt",OBJ_TEXT,time[10],Level14,time[10],Level14,Color14); If Alert14=1 and Level14-Spread/2*Point
60 then begin Alert(" || Level 14 reached= ",Level14,Symbol, "at", curtime, " || "); Flag3=CurTime; end; end; If Level15<>0 then begin MoveObject("Level15",OBJ_HLINE,CurTime,Level15,CurTime,Level15,Color15,Thik15,STYLE_SOLID); SetObjectText("Level15_txt","LOW 1 to 8 -"+NumberToStr(Level15,4)+" ","Arial",8,Color15); MoveObject("Level15_txt",OBJ_TEXT,time[10],Level15,time[10],Level15,Color15); If Alert15=1 and Level15-Spread/2*Point
60 then begin Alert(" || Level 15 reached= ",Level15,Symbol, "at", curtime, " || "); Flag3=CurTime; end; end; If Level16<>0 then begin MoveObject("Level16",OBJ_HLINE,CurTime,Level16,CurTime,Level16,Color16,Thik16,STYLE_SOLID); SetObjectText("Level16_txt","High 1 to 8 -"+NumberToStr(Level16,4)+" ","Arial",8,Color16); MoveObject("Level16_txt",OBJ_TEXT,time[10],Level16,time[10],Level16,Color16); If Alert16=1 and Level16-Spread/2*Point
60 then begin Alert(" || Level 16 reached= ",Level16,Symbol, "at", curtime, " || "); Flag3=CurTime; end; end; If Level17<>0 then begin MoveObject("Level17",OBJ_HLINE,CurTime,Level17,CurTime,Level17,Color17,Thik17,STYLE_SOLID); SetObjectText("Level17_txt","LOW 7 to 10 -"+NumberToStr(Level17,4)+" ","Arial",8,Color17); MoveObject("Level17_txt",OBJ_TEXT,time[10],Level17,time[10],Level17,Color17); If Alert17=1 and Level17-Spread/2*Point
60 then begin Alert(" || Level 17 reached= ",Level17,Symbol, "at", curtime, " || "); Flag3=CurTime; end; end; If Level18<>0 then begin MoveObject("Level18",OBJ_HLINE,CurTime,Level18,CurTime,Level18,Color18,Thik18,STYLE_SOLID); SetObjectText("Level18_txt","HIGH 7 to 10 -"+NumberToStr(Level18,4)+" ","Arial",8,Color18); MoveObject("Level18_txt",OBJ_TEXT,time[10],Level18,time[10],Level18,Color18); If Alert18=1 and Level18-Spread/2*Point
60 then begin Alert(" || Level 18 reached= ",Level18,Symbol, "at", curtime, " || "); Flag3=CurTime; end; end;
Author/Source:
?
Forex Directory
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact