#
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: Three color
Description:
Three color
//+------------------------------------------------------------------+ //| three_color.mq4 | //| Copyright © 2005, MetaQuotes Software Corp. | //| http://www.metaquotes.net/ | //+------------------------------------------------------------------+ #property copyright "Copyright © 2005, MetaQuotes Software Corp." #property link "http://www.metaquotes.net/" #property indicator_chart_window #property indicator_buffers 3 #property indicator_color1 Red #property indicator_color2 Green #property indicator_color3 Blue //---- buffers double ExtMapBuffer1[]; double ExtMapBuffer2[]; double ExtMapBuffer3[]; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { SetIndexBuffer(0,ExtMapBuffer1); SetIndexBuffer(1,ExtMapBuffer2); SetIndexBuffer(2,ExtMapBuffer3); //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int i,j,shift; static int width=1; //---- for(i=0; i
0 && j<10) { ExtMapBuffer2[shift]=EMPTY_VALUE; ExtMapBuffer3[shift]=EMPTY_VALUE; } } } //---- for(i=10; i
0 && j<10) { ExtMapBuffer1[shift]=EMPTY_VALUE; ExtMapBuffer3[shift]=EMPTY_VALUE; } } } //---- for(i=20; i
0 && j<10) { ExtMapBuffer1[shift]=EMPTY_VALUE; ExtMapBuffer2[shift]=EMPTY_VALUE; } } } //---- if(width>10) width=1; else width++; SetIndexStyle(0,DRAW_LINE,STYLE_SOLID,width); SetIndexStyle(1,DRAW_LINE,STYLE_SOLID,width); SetIndexStyle(2,DRAW_LINE,STYLE_SOLID,width); //---- return(0); } //+------------------------------------------------------------------+
Author/Source:
?
Forex Directory
|
Free Forex Strategies
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact