TRADERS´ES 05 - page 52

ESTRATEGIAS
52
05.2013
‘¡¡ Summary
‘ Classification: Averages
‘Summary !!
‘¡¡ Summary
‘ Classification: Volatility
‘Summary !!
‘¡¡ Parameters
Dim AlligatorPrice As Price ‘PriceCenter
Dim JawPeriod As Long ‘13
Dim JawLength As Long ‘8
Dim TeethPeriod As Long ‘8
Dim TeethLength As Long ‘5
Dim LipsPeriod As Long ‘5
Dim LipsLength As Long ‘3
‘Parameters !!
Dim JawData As DataIdentifier
Dim TeethData As DataIdentifier
Dim LipsData As DataIdentifier
Dim JawAnt#, JawAnt2#, TeethAnt#, TeethAnt2, LipsAnt#, LipsAnt2#, LastBar&
Option Explicit
Public APP As OscUserApp
Implements Indicator
Public Sub Indicator_OnInitCalculate()
With APP
JawData = .GetIndicatorIdentifier(AvWilder, Data, JawPeriod, AlligatorPrice)
TeethData = .GetIndicatorIdentifier(AvWilder, Data, TeethPeriod, AlligatorPrice)
LipsData = .GetIndicatorIdentifier(AvWilder, Data, LipsPeriod, AlligatorPrice)
LastBar = -1
.StartBar = 0
End With
End Sub
Public Sub Indicator_OnCalculateBar(ByVal Bar As Long)
With APP
Dim Jawact#, TeethAct#, LipsAct#, distact#, distant#
Dim ColorUp As Long
Dim ColorDown As Long
‘Si estamos en histórico
If LastBar <> Bar Then
JawAnt2 = JawAnt: TeethAnt2 = TeethAnt: LipsAnt2 = LipsAnt
Else ‘estamos en tiempo real
JawAnt = JawAnt2: TeethAct = TeethAnt2: LipsAnt = LipsAnt2
End If
Jawact = .GetIndicatorValue(JawData, JawLength)
TeethAct = .GetIndicatorValue(TeethData, TeethLength)
LipsAct = .GetIndicatorValue(LipsData, LipsLength)
If Jawact <> NullValue And TeethAct <> NullValue _
And LipsAct <> NullValue And JawAnt <> NullValue _
And TeethAnt <> NullValue And LipsAnt <> NullValue Then
‘Distancia Dientes-Mandibula (Por encima de 0)
distact = Abs(Jawact - TeethAct)
distant = Abs(JawAnt - TeethAnt)
If distant < distact Then
ColorUp = RGB(0, 255, 0)
Else
ColorUp = RGB(255, 0, 0)
End If
.SetIndicatorValue distact, 1, 0
‘Distancia Labios-Dientes (Por debajo de 0)
distact = -Abs(LipsAct - TeethAct)
distant = -Abs(LipsAnt - TeethAnt)
If distant < distact Then
ColorDown = RGB(0, 255, 0)
Else
ColorDown = RGB(255, 0, 0)
End If
.SetIndicatorValue distact, 2, 0
.SetIndicatorValue 0, 3
End If
.SetBarProperties 0, 1, ColorUp, 1, lsSolid, irVolume
.SetBarProperties 0, 2, ColorDown, 1, lsSolid, irVolume
JawAnt = Jawact: TeethAnt = TeethAct: LipsAnt = LipsAct
LastBar = Bar
End With
End SubEnd Sub
Codigo de Programacion del Gator Oscillator para Visual Chart 5
1...,42,43,44,45,46,47,48,49,50,51 53,54,55,56,57,58,59,60,61,62,...88
Powered by FlippingBook