#
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: DPO
Description:
DPO
//+------------------------------------------------------------------+ //| DPO.mq4 //| Ramdass - Conversion only //+------------------------------------------------------------------+ #property indicator_separate_window #property indicator_buffers 1 #property indicator_color1 Blue extern int x_prd=14; extern int CountBars=300; //---- buffers double dpo[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { string short_name; //---- indicator line IndicatorBuffers(1); SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,dpo); //---- return(0); } //+------------------------------------------------------------------+ //| DPO | //+------------------------------------------------------------------+ int start() { if (CountBars>=Bars) CountBars=Bars; SetIndexDrawBegin(0,Bars-CountBars+x_prd+1); int i,counted_bars=IndicatorCounted(); double t_prd; //---- if(Bars<=x_prd) return(0); //---- initial zero if(counted_bars
=0) { dpo[i]=Close[i]-iMA(NULL,0,x_prd,t_prd,MODE_SMA,PRICE_CLOSE,i); i--; } return(0); } //+------------------------------------------------------------------+
Author/Source:
Ramdass
Forex Directory
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact