Market Trader Forum

Market Trader Forum
das ultimative Expertenforum
 
RegistrierenRegistrieren  LoginLogin

Neues Thema eröffnen   Neue Antwort erstellen    Market Trader Forum Foren-Übersicht -> Links
Autor
Nachricht
Joram




Anmeldedatum: 17.08.2005
Beiträge: 2238

Visual Chart + Ross
Verfasst am: 16.04.2007, 06:31

http://www.visualchart.com/dexx/bulletins_2007/strategies/strategies_2007-04-05_DE.htm

Visual Chart hat sich neulich Ross Methode auf die Werkstattbank genommen.
_________________


 
wp


Anmeldedatum: 29.08.2005
Beiträge: 388


Verfasst am: 16.04.2007, 10:55

Hi Joram,

kannst Du irgendwie den Code als Text einstellen, so dass man ihn lesen kann?
_________________


Zuletzt bearbeitet von wp am 16.04.2007, 10:56, insgesamt einmal bearbeitet
 
Joram




Anmeldedatum: 17.08.2005
Beiträge: 2238


Verfasst am: 16.04.2007, 11:55

Hi Stephan,

ich habe nur das was Du auch sehen kannst. Ich habe keine Ahnung wo die Code als Text zu finden ist. Da muss Dir schon jemand helfen, der kundig in VisualChart ist. Ich denke, Swingman weisst Bescheid. Er hat schon mit VC4 experimentiert. Ich nutze Visual Chart bisher nur als Kursversorgung für meine EOD Charts.
_________________


 
SwingManT


Anmeldedatum: 17.08.2005
Beiträge: 1700
Wohnort: Frankfurt am Main


Verfasst am: 16.04.2007, 15:47

    '¡¡ Parameters
    Dim ObservationPeriod As Long '10
    Dim StrengthPivot As Long '1
    Dim NuMaxBarsHighLow2 As Long '3
    Dim NuMaxBarsHighLow3 As Long '2
    'Parameters !!
    Dim LastBar&, LastBar3&, LastBar3Ant&
    Dim LOWBarras() As Long
    Option Explicit
    Public APP As OscUserApp
    Implements Indicator
    Public Sub Indicator_OnInitCalculate()
    With APP
    ReDim LOWBarras(2)
    IniciarRegistro
    LastBar3 = 0
    LastBar = -1
    .StartBar = ObservationPeriod
    End With
    End Sub
    Public Sub Indicator_OnCalculateBar(ByVal Bar As Long)
    With APP
    Dim Precio1#, Precio2#, Precio3#
    Dim Bar1&, Bar2&, Bar3&, BarAux&, i&
    Dim Hay123 As Boolean
    If Bar <> LastBar Then
    LastBar3Ant = LastBar3
    If LOWBarras(2) <> 0 Then
    Bar1 = Bar - LOWBarras(0): Bar2 = Bar - LOWBarras(1): Bar3 = Bar - LOWBarras(2)
    Precio1 = .High(Bar1): Precio2 = .Low(Bar2): Precio3 = .High(Bar3)
    Pintar123 Bar1, Bar2, Precio1, Precio2, 1, Bar2
    Pintar123 Bar2, Bar3, Precio2, Precio3, 2, Bar3
    IniciarRegistro
    LastBar3 = LOWBarras(2)
    End If
    Else
    LastBar3 = LastBar3Ant
    End If
    If .GetHighestBar(Data, PriceHigh, ObservationPeriod + 1) = 1 Then LOWBarras(0) = Bar - 1
    If LOWBarras(0) <> 0 Then
    LOWBarras(1) = 0
    BarAux = .GetSwingLowBar(Data, 1, PriceLow, StrengthPivot, Bar - LastBar3)
    If BarAux <> NullValue And (Bar - BarAux) > LOWBarras(0) Then LOWBarras(1) = Bar - BarAux
    '--- Máximos superan Precio2
    If (LOWBarras(1) <> 0) And Not ValidarPivots(Bar - LOWBarras(1), PriceHigh, NuMaxBarsHighLow2) Then LOWBarras(1) = 0
    If LOWBarras(1) <> 0 Then
    LOWBarras(2) = 0
    BarAux = .GetSwingHighBar(Data, 1, PriceHigh, StrengthPivot, Bar - LastBar3)
    If BarAux <> NullValue Then
    Bar1 = Bar - LOWBarras(0): Bar2 = Bar - LOWBarras(1): Bar3 = BarAux
    Precio1 = .High(Bar1): Precio2 = .Low(Bar2): Precio3 = .High(Bar3)
    Hay123 = True
    '-- Estan en orden
    If Not ((Bar1 > Bar2) And (Bar2 >= Bar3)) Then Hay123 = False
    '-- Precio3 menor que Precio1
    If Not (Precio1 > Precio3) Then
    Hay123 = False
    LOWBarras(0) = Bar - BarAux
    LOWBarras(1) = 0
    End If
    '-- Precio2 es el menor
    For i = Bar3 To Bar1
    If (.GetPrice(PriceLow, i) - .Low(Bar2)) < 0 Then Hay123 = False
    Next i
    '-- Minimos superan Precio3
    If Not ValidarPivots(BarAux, PriceLow, NuMaxBarsHighLow3) Then Hay123 = False
    '-- Están los 3 Pivots
    If Hay123 Then
    LOWBarras(2) = Bar - BarAux
    End If
    End If
    End If
    End If
    LastBar = Bar
    End With
    End Sub
    Public Function ValidarPivots(Barra As Long, MaxMin As Integer, Distance As Long) As Boolean
    With APP
    Dim Valor As Boolean
    Dim Salir As Boolean
    Dim i%, j%, k%, Signo%
    Valor = False: Salir = False: i = 1
    Signo = 1
    If MaxMin = 2 Then Signo = -1
    If (Signo * .GetPrice(MaxMin, Barra)) - (Signo * .GetPrice(MaxMin, Barra + 1)) > 0 Then k = 1
    While Not Salir
    If (k <> 2) And (Signo * .GetPrice(3 - MaxMin, Barra - i)) - (Signo * .GetPrice(3 - MaxMin, Barra - j)) >= 0 Then k = k + 2
    If (k <> 1) And (Signo * .GetPrice(MaxMin, Barra - i)) - (Signo * .GetPrice(MaxMin, Barra - j)) >= 0 Then k = k + 1
    i = i + 1: j = j + 1
    If k >= 3 Then Salir = True
    If i > Distance Or i > Barra Then Salir = True
    Wend
    If k >= 3 Then Valor = True
    ValidarPivots = Valor
    End With
    End Function
    Public Sub Pintar123(Barx1 As Long, Barx2 As Long, x1 As Double, x2 As Double, Linea As Integer, BarX As Long)
    With APP
    Dim m#, i&, ValX#, BarValX#
    If (Barx1 - Barx2) <> 0 Then
    m = (x2 - x1) / (Barx1 - Barx2)
    .SetIndicatorValue x1, Linea, Barx1
    For i = Barx1 - 1 To BarX Step -1
    ValX = m * (Barx1 - i) + x1
    .SetIndicatorValue ValX, Linea, i
    Next i
    Else
    .SetIndicatorValue x2, Linea, BarX
    End If
    End With
    End Sub
    Public Sub IniciarRegistro()
    LOWBarras(0) = 0
    LOWBarras(1) = 0
    LOWBarras(2) = 0
    End Sub
    Public Sub Indicator_OnSetParameters(ParamArray ParamList() As Variant)
    '¡¡ Parameters initialization
    ObservationPeriod = ParamList(1)
    StrengthPivot = ParamList(2)
    NuMaxBarsHighLow2 = ParamList(3)
    NuMaxBarsHighLow3 = ParamList(4)
    'Parameters initialization !!
    End Sub


 
SwingManT


Anmeldedatum: 17.08.2005
Beiträge: 1700
Wohnort: Frankfurt am Main


Verfasst am: 16.04.2007, 15:48

'¡¡ Parameters
Dim ObservationPeriod As Long '10
Dim StrengthPivot As Long '1
Dim NuMaxBarsHighLow2 As Long '3
Dim NuMaxBarsHighLow3 As Long '2
'Parameters !!
Dim LastBar&, LastBar3&, LastBar3Ant&
Dim LOWBarras() As Long
Dim LOWBarrasAnt() As Long
Option Explicit
Public APP As OscUserApp
Implements Indicator
Public Sub Indicator_OnInitCalculate()
With APP
ReDim LOWBarras(2)
ReDim LOWBarrasAnt(2)
IniciarRegistro
LastBar3 = 0
LastBar = -1
.StartBar = ObservationPeriod
End With
End Sub
Public Sub Indicator_OnCalculateBar(ByVal Bar As Long)
With APP
Dim Precio1#, Precio2#, Precio3#
Dim Bar1&, Bar2&, Bar3&, BarAux&, i&
Dim Hay123 As Boolean
If Bar <> LastBar Then
LastBar3Ant = LastBar3
For i = 0 To 2
LOWBarrasAnt(i) = LOWBarras(i)
Next i
Else
LastBar3 = LastBar3Ant
For i = 0 To 2
LOWBarras(i) = LOWBarrasAnt(i)
Next i
End If
If .GetLowestBar(Data, PriceLow, ObservationPeriod + 1) = 1 Then
LOWBarras(0) = Bar - 1
LOWBarras(1) = 0
End If
If LOWBarras(0) <> 0 Then
If LOWBarras(1) = 0 Then
BarAux = .GetSwingHighBar(Data, 1, PriceHigh, StrengthPivot, Bar - LastBar3)
If BarAux <> NullValue And (Bar - BarAux) >= LOWBarras(0) Then LOWBarras(1) = Bar - BarAux
End If
'--- Minimos superan Precio2
If (LOWBarras(1) <> 0) And Not ValidarPivots(Bar - LOWBarras(1), PriceLow, NuMaxBarsHighLow2) Then LOWBarras(1) = 0
If LOWBarras(1) <> 0 Then
LOWBarras(2) = 0
BarAux = .GetSwingLowBar(Data, 1, PriceLow, StrengthPivot, Bar - LastBar3)
If BarAux <> NullValue Then
Bar1 = Bar - LOWBarras(0): Bar2 = Bar - LOWBarras(1): Bar3 = BarAux
Precio1 = .Low(Bar1): Precio2 = .High(Bar2): Precio3 = .Low(Bar3)
Hay123 = True
'-- Estan en orden
If Not ((Bar1 >= Bar2) And (Bar2 >= Bar3) And (Bar1 > Bar3)) Then Hay123 = False
'-- Precio3 menor que Precio1
If Hay123 And Not (Precio1 < Precio3) Then
Hay123 = False
LOWBarras(0) = Bar - BarAux
LOWBarras(1) = 0
End If
'-- Precio2 es el mayor
For i = (Bar3 + 1) To (Bar1 - 1)
If (.High(Bar2) - .High(i)) < 0 Then Hay123 = False
Next i
If Not ValidarPivots(BarAux, PriceHigh, NuMaxBarsHighLow3) Then Hay123 = False
'-- Están los 3 Pivots
If Hay123 Then
LOWBarras(2) = Bar - BarAux
End If
End If
End If
End If
If LOWBarras(0) <> 0 And LOWBarras(1) <> 0 And LOWBarras(2) <> 0 Then
Bar1 = Bar - LOWBarras(0): Bar2 = Bar - LOWBarras(1): Bar3 = Bar - LOWBarras(2)
Precio1 = .Low(Bar1): Precio2 = .High(Bar2): Precio3 = .Low(Bar3)
Pintar123 Bar1, Bar2, Precio1, Precio2, 1, Bar2
Pintar123 Bar2, Bar3, Precio2, Precio3, 2, Bar3
IniciarRegistro
LastBar3 = LOWBarras(2)
End If
LastBar = Bar
End With
End Sub
Public Function ValidarPivots(Barra As Long, MaxMin As Integer, Distance As Long) As Boolean
With APP
Dim Valor As Boolean
Dim Salir As Boolean
Dim i%, j%, k%, Signo%
Valor = False: Salir = False: i = 1
Signo = 1
If MaxMin = 2 Then Signo = -1
If (Signo * .GetPrice(MaxMin, Barra)) - (Signo * .GetPrice(MaxMin, Barra + 1)) > 0 Then k = 1
While Not Salir
If (k <> 2) And (Signo * .GetPrice(3 - MaxMin, Barra - i)) - (Signo * .GetPrice(3 - MaxMin, Barra - j)) >= 0 Then k = k + 2
If (k <> 1) And (Signo * .GetPrice(MaxMin, Barra - i)) - (Signo * .GetPrice(MaxMin, Barra - j)) >= 0 Then k = k + 1
i = i + 1: j = j + 1
If k >= 3 Then Salir = True
If i > Distance Or i > Barra Then Salir = True
Wend
If k >= 3 Then Valor = True
ValidarPivots = Valor
End With
End Function
Public Sub Pintar123(Barx1 As Long, Barx2 As Long, x1 As Double, x2 As Double, Linea As Integer, BarX As Long)
With APP
Dim m#, i&, ValX#, BarValX#
If (Barx1 - Barx2) <> 0 Then
m = (x2 - x1) / (Barx1 - Barx2)
.SetIndicatorValue x1, Linea, Barx1
For i = Barx1 - 1 To BarX Step -1
ValX = m * (Barx1 - i) + x1
.SetIndicatorValue ValX, Linea, i
Next i
Else
.SetIndicatorValue x2, Linea, BarX
End If
End With
End Sub
Public Sub IniciarRegistro()
LOWBarras(0) = 0
LOWBarras(1) = 0
LOWBarras(2) = 0
End Sub



 
SwingManT


Anmeldedatum: 17.08.2005
Beiträge: 1700
Wohnort: Frankfurt am Main


Verfasst am: 16.04.2007, 15:49

Public Sub Indicator_OnSetParameters(ParamArray ParamList() As Variant)
'¡¡ Parameters initialization
ObservationPeriod = ParamList(1)
StrengthPivot = ParamList(2)
NuMaxBarsHighLow2 = ParamList(3)
NuMaxBarsHighLow3 = ParamList(4)
'Parameters initialization !!
End Sub
Public Sub Indicator_OnCalculateRange(ByVal StartBar As Long, ByVal FinalBar As Long)
Dim i As Long
i = APP.StartBar
If StartBar > i Then
i = StartBar
End If
While Not APP.ShouldTerminate And i <= FinalBar
APP.CurrentBar = i
Indicator_OnCalculateBar i
i = i + 1
Wend
End Sub
Private Sub OscUserAppInstance_OnConnection(ByVal Application As OscUserApp, ByVal MTDllInst As Object, Custom() As Variant)
Set APP = Application
End Sub
_________________


 
SwingManT


Anmeldedatum: 17.08.2005
Beiträge: 1700
Wohnort: Frankfurt am Main


Verfasst am: 16.04.2007, 15:52


Die Charts sehen aber komisch aus...
- Keine Numerierung
- Fehlende Linien

 
Neues Thema eröffnen   Neue Antwort erstellen    Market Trader Forum Foren-Übersicht -> Links

Tags: visual chart

 
 Verwandte Themen   Aufrufe   Letzter Beitrag 
Keine neuen Beiträge Voigt Methode in Theorie in Praxis 4112 06.03.2009, 17:19
Keine neuen Beiträge Chart 2037 28.08.2008, 13:28
Keine neuen Beiträge Visual Chart? 858 18.05.2006, 17:38
Keine neuen Beiträge Chart Programm Tai Pan EOD 770 25.01.2006, 13:12
Keine neuen Beiträge Unterer Chart 630 05.11.2005, 17:55
 



[ Time: 0.2783s ][ Queries: 133 (0.0157s) ][ GZIP on - Debug on ]