RainBow – Indicator

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #140307 quote
    Erbsenzaehler
    Participant
    Junior

    RainBow – indicator for optical analysis Remarks: – Before switching from linear to progressive, please reduce “AnzahlweiterexMAs” < 10 – With “StartwertSchnellster” as a Fibo-number and the “FaktorWeiterexMAs” 1,618 and “progressive”: a xMA-bundle with Fibo-numbers as period lengths is created (Sorry for bad English. Was translated with the Google Translater.) Don’t know what Version of PRT is necessary.

    #140502 quote
    robertogozzi
    Moderator
    Master
    Will you please post a link to that indicator?
    #140505 quote
    Erbsenzaehler
    Participant
    Junior
    // RainBow - Indikator
    //
    // Übergabe der Variablen
    prdxMA1   = StartwertSchnellster  //   3      (Fibo-Zahl für Fibo-xMAs)
    stpxMAs   = SchrittWeitexMAs      //   3      (gültig für lineare Berechnunge
    fktxMAs   = FaktorWeitexMAs       //   1.6188 (gültig für exponetielle Berechnung; 1.618 entspricht Fibo-Ratio)
    numxMAs   = AnzahlweiterexMAs     //   22     max 9 bei exponentiellen Abstand (Berechnungszeit!!!)
    typxMAs   = xMAType               //   1
    artBerchg = Linear1Progressiv0    //   Linearer Abstand : 1 ; Exponetieller Abstand: 0
    MyClose   = CustomClose
    //
    // Bestücken des Arrys
    $prdxMA[0] = prdxMA1
    if artBerchg = 1 then      // Perioden für linearen Abstand
    for i = 1 to numxMAs
    $prdxMA[i] = $prdxMA[i - 1] + stpxMAs
    next
    else // artBerchg = 0 then   // Perioden für wachsenden Abstand
    for i = 1 to numxMAs
    $prdxMA[i] = round($prdxMA[i - 1] * fktxMAs)
    next
    endif
    
    //
    // Berechnung Farbverlauf
    $FarbeRot[0]   = 255
    $FarbeGruen[0] =   0
    $FarbeBlau[0]  =   0
    ratio = 1 / numxMAs
    IF numxMAs > 1 Then
    For k = 1 To numxMAs
    if ratio * k <= 0.25 then
    $FarbeRot[k]   = 255
    $FarbeGruen[k] = 255 * 4 * k  / numxMAs
    $FarbeBlau[k]  =   0
    elsif ratio * k > 0.25 and ratio * k <= 0.50 then
    $FarbeRot[k]   = 255 * (2 - 4 * k / numxMAs)
    $FarbeGruen[k] = 255
    $FarbeBlau[k]  =   0
    elsif ratio * k > 0.50 and ratio * k <= 0.75 then
    $FarbeRot[k]   =   0
    $FarbeGruen[k] = 255
    $FarbeBlau[k]  = 255 * ((4 * k / numxMAs) - 2)
    elsif  ratio * k > 0.27  then
    $FarbeRot[k]   =   0
    $FarbeGruen[k] = 255 * (4 - 4 * k / numxMAs )
    $FarbeBlau[k]  = 255
    endif
    next
    else
    break
    endif
    //
    // Berechnen der xMA-Werte
    for j = 0 to numxMAs
    $MYxMA [j] = Average[$prdxMA[j],typxMAs](MyClose)
    $MYxMA1[j] = Average[$prdxMA[j],typxMAs](MyClose[1])
    DRAWSEGMENT(barindex, $MYxMA[j], barindex[1], $MYxMA1[j])COLOURED($FarbeRot[j],$FarbeGruen[j],$FarbeBlau[j])
    next
    //
    RETURN
    
    Anmerkung-2020-07-28-151346.jpg Anmerkung-2020-07-28-151346.jpg
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

RainBow – Indicator


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Erbsenzaehler
5 years, 6 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 07/30/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...