Kuriose RSI Abweichung nach Variablen-Zuweisung

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #181645 quote
    Rainer (RFW)
    Participant
    Senior

    Guten Abend,
    ich habe in kurioses Problem mit einem im Grunde einfach Divergenz-Indikator, jedoch nur mit dem RSI.
    Weise ich die RSI-Grundlage per Variable, hier IndMod = 4, zu ergibt sich eine kuriose, wenn auch nur geringfügige Abweichung, siehe Screenshot.
    Der Code ist zu den anderen Prüf-Indikatoren (siehe Screenshot) bis auf die Variablen-Zuweisung identisch. Ggf. mal nachfolgenden Code mit/ohne Kommentierung in Zeile 30 bis 32 den Fehler nachstellen. .itf-File anbei.
    Hat jemand eine Idee was hierfür die Ursache sein könnte?
    Danke vorab und einen schönen Abend.
    Liebe Grüße
    Rainer

    DIVSeachPeriods = 20
    IndicatorPeriod = 12
    IndMod = 4
    ////********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    If IndMod = 1 Then
    SDIVSrc1        = AroonDown[IndicatorPeriod] // 14
    LDIVSrc1        = AroonUp[IndicatorPeriod]
    ElsIf IndMod = 2 Then
    SDIVSrc1        = BollingerUp[IndicatorPeriod](close) // 20
    LDIVSrc1        = BollingerDown[IndicatorPeriod](close)
    ElsIf IndMod = 3 Then
    DIVSrc1         = CCI[IndicatorPeriod]// 20
    SDIVSrc1        = DIVSrc1
    LDIVSrc1        = DIVSrc1
    ElsIf IndMod = 4 Then
    DIVSrc1         = RSI[IndicatorPeriod] // 12
    SDIVSrc1        = DIVSrc1
    LDIVSrc1        = DIVSrc1
    ElsIf IndMod = 5 Then
    DIVSrc1         = Stochastic[IndicatorPeriod,3](close) //14,3
    SDIVSrc1        = DIVSrc1
    LDIVSrc1        = DIVSrc1
    ElsIf IndMod = 6 Then
    DIVSrc1         = Williams[IndicatorPeriod](close) //14
    SDIVSrc1        = DIVSrc1
    LDIVSrc1        = DIVSrc1
    EndIf
    
    //**** Dies zur Fehlernachstellung auskommentieren.... Kurioser Weise ergeben sich ohne Zuweisung des RSI geringe Abweichungen.....???
    //DIVSrc1         = RSI[IndicatorPeriod] // 12
    //SDIVSrc1        = DIVSrc1
    //LDIVSrc1        = DIVSrc1
    //
    //********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    DIVSrc2         = Close
    SDIVSrc2        = DIVSrc2
    LDIVSrc2        = DIVSrc2
    //********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    If BarIndex > (Max(IndicatorPeriod,DivergencePeriod)) Then
    //********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    If (SDIVSrc1[1] > SDIVSrc1[0]) And (SDIVSrc1[1] > SDIVSrc1[2]) Then
    SDIVSrc1M1 = Highest[DIVergencePeriod](SDIVSrc1)
    SDIVSrc1M2 = SDIVSrc1[1]
    SDIVSrc2M1 = Highest[DIVergencePeriod](SDIVSrc2)
    SDIVSrc2M2 = SDIVSrc2[1]
    If (SDIVSrc1M2 < SDIVSrc1M1) And (SDIVSrc2M2 > SDIVSrc2M1[1]) Then
    For SDIV1HHBix = 1 To DIVergencePeriod Do
    If SDIVSrc1[SDIV1HHBix] = SDIVSrc1M1 Then
    SDIV1HHBi = SDIV1HHBix
    DRAWVLINE(BarIndex[1])Coloured(255,0,0)Style(Line,1)
    DRAWSEGMENT(BarIndex[1],SDIVSrc1[1],BarIndex[SDIV1HHBi],SDIVSrc1[SDIV1HHBi])Coloured(255,0,0)Style(Line,5)
    Break
    Endif
    Next
    EndIf
    EndIf
    //********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    If (LDIVSrc1[1] < LDIVSrc1[0]) And (LDIVSrc1[1] < LDIVSrc1[2]) Then
    LDIVSrc1M1 = Lowest[DIVergencePeriod](LDIVSrc1)
    LDIVSrc1M2 = LDIVSrc1[1]
    LDIVSrc2M1 = Lowest[DIVergencePeriod](LDIVSrc2)
    LDIVSrc2M2 = LDIVSrc2[1]
    If (LDIVSrc1M2 > LDIVSrc1M1) And (LDIVSrc2M2 < LDIVSrc2M1[1]) Then
    For LDIV1HHBix = 1 To DIVergencePeriod Do
    If LDIVSrc1[LDIV1HHBix] = LDIVSrc1M1 Then
    LDIV1HHBi = LDIV1HHBix
    DRAWVLINE(BarIndex[1])Coloured(0,255,0)Style(Line,1)
    DRAWSEGMENT(BarIndex[1],LDIVSrc1[1],BarIndex[LDIV1HHBi],LDIVSrc1[LDIV1HHBi])Coloured(0,255,0)Style(Line,5)
    Break
    Endif
    Next
    EndIf
    Endif
    //********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    EndIf // MinBarIndex
    //********************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************
    Return SDIVSrc1, LDIVSrc1
    
    bolsatrilera thanked this post
    #181689 quote
    robertogozzi
    Moderator
    Master

    Ich habe Ihren Code gründlich getestet, konnte aber die Ursache nicht finden. Ich habe Nicolas gefragt und er wird es PRT zur Untersuchung melden. Wir informieren Sie, sobald die Ursache feststeht.

    Rainer (RFW) thanked this post
    #181715 quote
    Rainer (RFW)
    Participant
    Senior

    Guten Morgen Roberto,
    schon mal ein HERZLICHES DANKESCHÖN für die Bemühungen.
    Ich wünsche einen schönen erfolgreichen Tag.
    Liebe Grüße
    Rainer

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Kuriose RSI Abweichung nach Variablen-Zuweisung


ProBuilder Support

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Rainer (RFW)
4 years, 2 months ago.

Topic Details
Forum: ProBuilder Support
Language: German
Started: 11/15/2021
Status: Active
Attachments: 2 files
Logo Logo
Loading...