#
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: X profile
Description:
The profile of the market
//+------------------------------------------------------------------+ //| X_profile.mq4 | //| Copyright © 2005, Trading Studio. | //| http://www.bluechips.it | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, Trading Studio." #property link "http://www.bluechips.it" #property indicator_chart_window #property indicator_buffers 5 #property indicator_color1 Red #property indicator_color2 Yellow #property indicator_color3 Green #property indicator_color4 Yellow #property indicator_color5 Green double buffer1[]; double buffer2[]; double buffer3[]; double buffer4[]; double buffer5[]; double parziale; extern datetime DataInizio=D'2005.08.01 04:30'; //+------------------------------------------------------------------+ //| inizializzazione | //+------------------------------------------------------------------+ int init() { Print("sei nell_indicatore"); //---- settaggio indicatore SetIndexStyle(0,DRAW_LINE); SetIndexBuffer(0,buffer1); SetIndexBuffer(1,buffer2); SetIndexBuffer(2,buffer3); SetIndexBuffer(3,buffer4); SetIndexBuffer(4,buffer5); IndicatorShortName("31Prova3"); if(!SetIndexBuffer(0,buffer1) && !SetIndexBuffer(1,buffer2) && !SetIndexBuffer(2,buffer3) && !SetIndexBuffer(3,buffer4) && !SetIndexBuffer(4,buffer5)) Print("buffer non settato"); //---- return(0); } //+------------------------------------------------------------------+ //| deinizializzazione //+------------------------------------------------------------------+ int deinit() { return(0); } //+------------------------------------------------------------------+ //| iterazione //+------------------------------------------------------------------+ int start() { double array_price[][6]; int cont; double deviazione; ArrayInitialize(array_price,0); ArrayCopyRates(array_price,(Symbol())); for (int j = Bars-1; j >= 0; j--) { if (Time[j]>=DataInizio) { for (int i = j; i >= 0; i--) { cont++; parziale=parziale+array_price[i][4]; buffer1[i]=parziale/cont; deviazione=iStdDev(NULL,0,cont,MODE_SMA,0,PRICE_CLOSE,0); buffer2[i]=buffer1[i]+deviazione; buffer3[i]=buffer1[i]+(2*deviazione); buffer4[i]=buffer1[i]-deviazione; buffer5[i]=buffer1[i]-(2*deviazione); } break; } } return(0); } //+------------------------------------------------------------------+
Author/Source:
Trading Studio
Forex Directory
|
Free Forex Strategies
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact