#
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: Bunnygirl EMA cross with filter
Description:
Bunnygirl EMA cross with filter
/*[[ Name := BunnyCross EMA Author := Steven Retz Link := http://www.RetzNest.com Separate Window := No First Color := Blue First Draw Type := Line First Symbol := 217 Use Second Data := Yes Second Color := Red Second Draw Type := Line Second Symbol := 218 ]]*/ Inputs : FastBars(5),SlowBars(20),Filter(20); Variables : FPrev(0),FCrnt(0),Fast(0),SPrev(0),SCrnt(0),Slow(0); Variable : shift(0); SetLoopCount(0); if Fast < Slow then { shift = Bars - Fast; } else { shift = Bars - Slow; } FPrev = iMA(FastBars,MODE_EMA,shift); SPrev = iMA(SlowBars,MODE_EMA,shift); For shift=shift-1 Downto 0 Begin FCrnt = iMA(FastBars,MODE_EMA,shift); SCrnt = iMA(SlowBars,MODE_EMA,shift); if FPrev < SPrev and FCrnt > SCrnt then Fast = SPrev + Filter*Point; if FPrev > SPrev and FCrnt < SCrnt then Slow = SPrev - Filter*Point; if Fast <> 0 then SetIndexValue(shift,Fast); if Slow <> 0 then SetIndexValue2(shift,Slow); FPrev = FCrnt; SPrev = SCrnt; End;
Author/Source:
Steven Retz
Forex Directory
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact