#
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: Metastock Indicators
Title: Gap Bar Counter
Description:
Gap Bar Counter
Gap Bar Counter { Open to (prev) Close gap bar counter v1.0 CCopyright 2006 Jose Silva. The grant of this license is for personal use only - no resale or repackaging allowed. http://www.metastocktools.com } { User inputs } minGap:=Input("Minimum gap %",0,50,1); pds:=Input("gap count Periods",1,2520,20); type:=Input("[1]GapUps, [2]GapDowns, [3]Both",1,3,3); plot:=Input("plot Gap [1]Count, [2]%count, [3]%change",1,3,1); { Gap % change } changePer:=(O/Ref(C,-1)-1)*100; { Gap Up/Down signals } gapUpSignal:=changePer>minGap; gapDwSignal:=changePer<-minGap; gapType:=If(type=1,gapUpSignal, If(type=2,gapDwSignal,gapUpSignal+gapDwSignal)); { Gap Up/Down signal count, count avg, %, %avg } count:=Sum(gapType,pds); countAvg:=Cum(count)/Cum(IsDefined(count)); countPer:=count/pds*100; countPerAvg:=Cum(countPer)/Cum(IsDefined(countPer)); { Plot in own window } If(plot=1,countAvg,If(plot=2,countPerAvg,minGap)); If(plot=1,countAvg,If(plot=2,countPerAvg,-minGap)); If(plot=1,count,If(plot=2,countPer,changePer))
Author/Source:
http://www.metastocktools.com
Forex Directory
|
Forex Trading Systems
|
Privacy
|
Disclaimer
|
Contact