#
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: SAR Color
Description:
SAR Color
//+------------------------------------------------------------------+ //| SAR_COLOR.mq4 | //| Kalenzo | //| http://www.foreksik.prv.pl | //+------------------------------------------------------------------+ #property copyright "Kalenzo" #property link "http://www.foreksik.prv.pl" #property indicator_color1 Red #property indicator_color2 Green #property indicator_chart_window #property indicator_buffers 2 double sarUp[],sarDn[];//buffers extern double Step = 0.02; extern double Maximum = 0.2; extern int Precision = 4; //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators SetIndexStyle(0,DRAW_ARROW,EMPTY,1); SetIndexStyle(1,DRAW_ARROW,EMPTY,1); SetIndexBuffer(0,sarUp); SetIndexBuffer(1,sarDn); SetIndexArrow(0,158); SetIndexArrow(1,158); IndicatorShortName("SAR COLORED"); SetIndexLabel(0,"SAR Up Channel"); SetIndexLabel(1,"SAR Down Channel"); SetIndexDrawBegin(0,2); SetIndexDrawBegin(1,2); //---- return(0); } //+------------------------------------------------------------------+ //| Custor indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int limit; int counted_bars=IndicatorCounted(); if(counted_bars<0) counted_bars=0; if(counted_bars>0) counted_bars--; limit=Bars-counted_bars; //---- for(int i = 0; i
= iHigh(Symbol(),0,i)) { sarUp[i] = sar; sarDn[i] = 0; } else { sarUp[i] = 0; sarDn[i] = sar; } } //---- return(0); } //+------------------------------------------------------------------+
Author/Source:
Kalenzo
Forex Directory
|
Free Forex Strategies
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact