#
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: Mean Deviation from SMA
Description:
Mean Deviation from SMA
/*[[ Name := Mean Deviation Author := Luis Damiani Separate Window := yes First Color := lime First Draw Type := histogram First Symbol := 104 Use Second Data := yes Second Color := OrangeRed Second Draw Type := histogram Second Symbol := 104 ]]*/ Inputs : Periods(6),delta(3),num_bars(200); Variables : shift(0), cnt(0), loopbegin(0); Variables : md(0),md_1(0),trade(0); Variables : prevbars(0),start(-1); SetLoopCount(0); For shift=num_bars Downto 0 Begin md=(((high[shift]+low[shift]+close[shift])/3)-iMAEx(periods,MODE_SMA,0,PRICE_TYPICAL,shift))/iCCIEx(periods,PRICE_TYPICAL,shift)/0.015; //md_1=(((high[shift+1]+low[shift+1]+close[shift+1])/3)-iMAEx(periods,MODE_SMA,0,PRICE_TYPICAL,shift+1))/iCCIEx(periods,PRICE_TYPICAL,shift+1)/0.015; if md
delta then trade=delta;}; if !(trade>0) then {SetIndexValue2(shift,md);SetIndexValue(shift,0);} else {SetIndexValue2(shift,0);SetIndexValue(shift,md);}; md_1=md; End; md_1=0;
Author/Source:
Luis Damiani
Forex Directory
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact