#
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 MQ4 Indicators
Title: Support and Resistance Indicator
Description:
Support and Resistance Indicator
//+------------------------------------------------------------------+ //| Support and Resistance | //| Copyright © 2004 Barry Stander | //| http://myweb.absa.co.za/stander/4meta/ | //+------------------------------------------------------------------+ #property copyright "Click here: Barry Stander" #property link "http://myweb.absa.co.za/stander/4meta/" #property indicator_chart_window #property indicator_buffers 2 #property indicator_color1 Red #property indicator_color2 Blue //---- buffers double v1[]; double v2[]; double val1; double val2; int i; int init() { IndicatorBuffers(2); //---- drawing settings SetIndexArrow(0, 119); SetIndexArrow(1, 119); SetIndexStyle(0,DRAW_ARROW,STYLE_DOT,1,Red); SetIndexDrawBegin(0,i-1); SetIndexBuffer(0, v1); SetIndexLabel(0,"Resistance"); SetIndexStyle(1,DRAW_ARROW,STYLE_DOT,1,Blue); SetIndexDrawBegin(1,i-1); SetIndexBuffer(1, v2); SetIndexLabel(1,"Support"); return(0); } int start() { i=Bars; while(i>=0) { val1 = iFractals(NULL, 0, MODE_UPPER,i); if (val1 > 0) v1[i]=High[i]; else v1[i] = v1[i+1]; val2 = iFractals(NULL, 0, MODE_LOWER,i); if (val2 > 0) v2[i]=Low[i]; else v2[i] = v2[i+1]; i--; } return(0); } //+------------------------------------------------------------------+
Author/Source:
Barry Stander
Forex Directory
|
Free Forex Strategies
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact