Conversion indicateur mq4 RHO-PRO-6

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #233135 quote
    touline
    Participant
    Senior

    Bonjour
    Pourriez-vous convertir cet indicateur mq4 vers prorealtime s’il vous plait
    Un grand merci d’avance
    Cordialement

    RHO-Pro-6.mq4 RHO-PRO-6.png RHO-PRO-6.png
    #233223 quote
    Iván González
    Moderator
    Master

    Holà. Ici vous avez le code en PRT :

    //-----------------------------------------------------------------------//
    //PRC_MACD RHO
    //version = 0
    //29.05.24
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //-----------------------------------------------------------------------//
    //-----Inputs------------------------------------------------------------//
    PeriodMA1 = 5
    PeriodMA2 = 10
    PeriodMA3 = 11
    PeriodMA4 = 13
    MAType=1
    src=customclose
    CrossType=1// 0=Cross_Fast_and_SlowLine / 1=Cross_FastLine_and_Zero
    //-----------------------------------------------------------------------//
    //-----Moving averages calculation---------------------------------------//
    maa1=average[PeriodMA1,MAType](src)
    maa2=average[PeriodMA2,MAType](src)
    maa3=average[PeriodMA3,MAType](src)
    maa4=average[PeriodMA4,MAType](src)
    //-----------------------------------------------------------------------//
    //-----MACD Calculation--------------------------------------------------//
    FastMACD=maa1-maa2
    SlowMACD=maa3-maa4
    //-----------------------------------------------------------------------//
    //-----Signals-----------------------------------------------------------//
    if CrossType=1 then
    //-----Crossing Fast Line with Zero
    if fastMACD crosses over 0 then
    drawarrowup(barindex,0)coloured("green")
    elsif fastMACD crosses under 0 then
    drawarrowdown(barindex,0)coloured("red")
    endif
    else
    //-----Crossing Fast Line with SlowLine
    //-----Special case - fast line is zero (MA1/2 Periods = 0)
    if periodMA1=0 and periodMA2=0 then
    if slowmacd crosses under 0 then
    drawarrowdown(barindex,0)coloured("red")
    endif
    else
    //-----Standard case
    if fastmacd crosses over slowmacd then
    drawarrowup(barindex,slowmacd)coloured("green")
    elsif fastmacd crosses under slowmacd then
    drawarrowdown(barindex,slowmacd)coloured("red")
    endif
    endif
    endif
    //-----------------------------------------------------------------------//
    //-----Color-------------------------------------------------------------//
    if slowMACD>0 then
    r=0
    b=255
    else
    r=255
    b=0
    endif
    //-----------------------------------------------------------------------//
    return fastMACD as "FastMACD"style(histogram)coloured("yellow"), slowMACD as "SlowMACD"style(histogram)coloured(r,0,b),0 as "Zero"style(dottedline2,2)
    
    KumoNoJuzza thanked this post
    #233261 quote
    touline
    Participant
    Senior

    Bonjour Ivan, merci pour votre bon travail, est-il possible de créer un paramètre externe sous forme

    De case a cocher dans les propriétés de l’indicateur, avec la possibilité de choisir

    Les moyenne mobile sma/ ema/ smma/ lwma   comme fastmacd et slowmacd

    Un grand merci d’avance

    Cordialement

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

Conversion indicateur mq4 RHO-PRO-6


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
touline @touline Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by touline
1 year, 9 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 05/28/2024
Status: Active
Attachments: 3 files
Logo Logo
Loading...