Genesis Matrix & ADX Screener

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #89178 quote
    eckaw
    Participant
    Veteran

    Hi Nicolas,

    I have been using the Genesis Matrix indicator along with Stochastic (11, 3, 3) and ADX to confirm trend strength in a trend following scalping strategy.

    The way I have this setup is as follows:

    – First check trend direction on a 1h timeframe.

    – Place trades on a faster timeframe in the same direction as the trend on the slower timeframe

    – Genesis Matrix 5min (all boxes signalling the same colour, blue = BUY / red = SELL)

    – Stochastic [11, 3, 3]  5min moving up on a buy (blue) signal and down on a sell (red) signal

    – Stochastic 15min moving the same direction as on the 5min timeframe

    – ADX is above 20, ideally on all 3 timeframes but at least on the 15min and 5min simultaneously.

     

    It would be interesting to have a screener based on the above criteria. Perhaps one screener would find buy opportunities (all 4 boxes blue in the 5min TF, stochastic 5min and 15min moving up and ADX > 20) and the second screener that finds sell opportunities (all 4 boxes red in the 5min TF, stochastic 5min and 15min moving down and ADX > 20)

    I also tend to use tick mode to find the best timing to enter the trades.

    Please let me know your thoughts on this and thanks for taking the time to review.

    Best,

    Erik

    cedric croze thanked this post
    DE0FA6FA-50FA-4E82-9D25-1AE2F0342027.jpeg DE0FA6FA-50FA-4E82-9D25-1AE2F0342027.jpeg 72BA4303-D038-44FB-BDE6-E8F2F4B832B0.jpeg 72BA4303-D038-44FB-BDE6-E8F2F4B832B0.jpeg
    #91361 quote
    Nicolas
    Keymaster
    Master

    Sorry for late reply, are you still requesting the screener code you described above?

    #91520 quote
    eckaw
    Participant
    Veteran

    Hi Nicolas,

    Thanks for getting back to me. Yes I would still be interested in this screener. I’m experimenting with multi time frame strategies at the moment but fairly new to coding so I’m still learning.

    #91622 quote
    Nicolas
    Keymaster
    Master

    Here is the code for that strategy, it embeds all conditions except the 1-hour timeframe (trend direction?) for which I don’t know how you define it?

    The screener returns bullish and bearish results sorted with a number:

    • 1 = bullish
    • -1 = bearish
    //PRC_Genesis Matrix | indicator
    //10.09.2018
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from MT4 indi
    
    timeframe(15 minutes)
    adx15 = ADXR[14]>20
    sto15 = Stochastic[11,3](close)
    sto15bull = sto15>sto15[1]
    sto15bear = sto15<sto15[1] 
    
    timeframe(default)
    adx5 = ADXR[14]>20
    sto5 = Stochastic[11,3](close)
    sto5bull = sto5>sto5[1]
    sto5bear = sto5<sto5[1]
    // --- settings
    //TVI_Settings
    TVIr=12
    TVIs=12
    TVIu=5
    //CCI_Settings
    CCIPeriod=20
    //T3_Settings
    T3Period=8
    //GannHiLo_Settings
    GannHiLoPeriod=10
    // --- end of settings
    
    result=0
    
    //TVI (Ticks Volume Indicator)
    Mypoint=pointsize
    UpTicks=(Volume+(Close-Open)/MyPoint)/2
    DownTicks=Volume-UpTicks
    EMAUpTicks=average[TVIr,1](UpTicks)
    EMADownTicks=average[TVIr,1](DownTicks)
    DEMAUpTicks=average[TVIs,1](EMAUpTicks)
    DEMADownTicks=average[TVIs,1](EMADownTicks)
    TVIcalculate=100.0*(DEMAUpTicks-DEMADownTicks)/(DEMAUpTicks+DEMADownTicks)
    TVI=average[TVIu,1](TVIcalculate)
    //ProcessTVI
    if TVI>=TVI[1] then
    result=result+1
    else
    result=result-1
    endif
    
    //CCI (Commodity Channel Index)
    dSig=CCI[CCIPeriod](typicalPrice)
    //ProcessCCI
    if dSig>0 then
    result=result+1
    else
    result=result-1
    endif
    
    //T3
    e1 = ExponentialAverage[T3Period](close)
    e2 = ExponentialAverage[T3Period](e1)
    e3 = ExponentialAverage[T3Period](e2)
    e4 = ExponentialAverage[T3Period](e3)
    e5 = ExponentialAverage[T3Period](e4)
    e6 = ExponentialAverage[T3Period](e5)
    b = 0.618
    b2 = (b * b)
    b3 = (b * b * b)
    c1 = -b3
    c2 = (3 * b2) + (3 * b3)
    c3 = (-6 * b2) - (3 * b) - (3 * b3)
    c4 = 1 + (3 * b) + b3 + (3 * b2)
    avg = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3
    //ProcessT3
    if avg>=avg[1] then
    result=result+1
    else
    result=result-1
    endif
    
    //GannHiLo
    if Close>average[gannhiloperiod](high)[1] then
    gann=1
    elsif Close<average[gannhiloperiod](low)[1] then
    gann=-1
    endif
    //ProcessGann
    if gann>0 then
    result=result+1
    else
    result=result-1
    endif
    
    bulltest = result=4 and adx5 and adx15 and sto5bull and sto15bull
    beartest = result=-4 and adx5 and adx15 and sto5bear and sto15bear
    
    if bulltest then 
    crit=1
    else
    crit=-1
    endif
    
    screener[bulltest or beartest] (crit as "bull or bear?")
    
    cedric croze thanked this post
    #92399 quote
    iloco17
    Participant
    Junior

    bonjour

    y a t il un moyen d’adapter cela à un timing journalier?

    merci

    #92400 quote
    Vonasi
    Moderator
    Master

    iloco17 – English only in the English forums please.

    #92447 quote
    Nicolas
    Keymaster
    Master

    @iloco17

    Sure, if you want to change it to a daily-timeframe, just change the TIMEFRAME instruction:

    TIMEFRAME(daily)
    Meta Signals Pro thanked this post
    #105647 quote
    Meta Signals Pro
    Participant
    Veteran
    //PRC_Genesis Matrix | indicator
    //10.09.2018
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from MT4 indi
    
    
    MinPrix = close >2.5
    MinVolume = summation [10](Average[23](volume)>= 5000000)=10
    
    //fraicheursignal = -1
    
    
    //TIMEFRAME(weekly)
    //adx15 = ADXR[14]>20
    //sto15 = Stochastic[11,3](close)
    //sto15bull = sto15>sto15[1]
    //sto15bear = sto15<sto15[1]
    //
    //TIMEFRAME(default)
    //adx5 = ADXR[14]>20
    //sto5 = Stochastic[11,3](close)
    //sto5bull = sto5>sto5[1]
    //sto5bear = sto5<sto5[1]
    // --- settings
    //TVI_Settings
    TVIr=12
    TVIs=12
    TVIu=5
    //CCI_Settings
    CCIPeriod=7
    //T3_Settings
    T3Period=8
    //GannHiLo_Settings
    GannHiLoPeriod=10
    // --- end of settings
     
    result=0
     
    //TVI (Ticks Volume Indicator)
    Mypoint=pointsize
    UpTicks=(Volume+(Close-Open)/MyPoint)/2
    DownTicks=Volume-UpTicks
    EMAUpTicks=average[TVIr,1](UpTicks)
    EMADownTicks=average[TVIr,1](DownTicks)
    DEMAUpTicks=average[TVIs,1](EMAUpTicks)
    DEMADownTicks=average[TVIs,1](EMADownTicks)
    TVIcalculate=100.0*(DEMAUpTicks-DEMADownTicks)/(DEMAUpTicks+DEMADownTicks)
    TVI=average[TVIu,1](TVIcalculate)
    //ProcessTVI
    if TVI>=TVI[1] then
    result=result+1
    else
    result=result-1
    endif
     
    //CCI (Commodity Channel Index)
    dSig=CCI[CCIPeriod](typicalPrice)
    //ProcessCCI
    if dSig>0 then
    result=result+1
    else
    result=result-1
    endif
     
    //T3
    e1 = ExponentialAverage[T3Period](close)
    e2 = ExponentialAverage[T3Period](e1)
    e3 = ExponentialAverage[T3Period](e2)
    e4 = ExponentialAverage[T3Period](e3)
    e5 = ExponentialAverage[T3Period](e4)
    e6 = ExponentialAverage[T3Period](e5)
    b = 0.618
    b2 = (b * b)
    b3 = (b * b * b)
    c1 = -b3
    c2 = (3 * b2) + (3 * b3)
    c3 = (-6 * b2) - (3 * b) - (3 * b3)
    c4 = 1 + (3 * b) + b3 + (3 * b2)
    avg = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3
    //ProcessT3
    if avg>=avg[1] then
    result=result+1
    else
    result=result-1
    endif
     
    //GannHiLo
    if Close>average[gannhiloperiod](high)[1] then
    gann=1
    elsif Close<average[gannhiloperiod](low)[1] then
    gann=-1
    endif
    //ProcessGann
    if gann>0 then
    result=result+1
    else
    result=result-1
    endif
     
    bulltest = result=4 and MinPrix and MinVolume //adx5 and adx15 and sto5bull and sto15bull and
    beartest = result=-4 and MinPrix and MinVolume // and adx5 and adx15 and sto5bear and sto15bear and
    
    fraicheursignal=-1
    
    if bulltest then
    // fraîcheur signal bull
    
    
    IF fraicheursignal=-1 AND bulltest[1]<4 THEN
    fraicheursignal = 0
    
    
    
    ELSIF fraicheursignal=-1 AND bulltest[2]<4 THEN
    fraicheursignal = 1
    
    
    
    ELSIF fraicheursignal=-1 AND bulltest[3]<4 THEN
    fraicheursignal = 2
    
    ENDIF
    
    
    
    else
    // fraîcheur signal bear
    
    IF fraicheursignal=-1 AND bulltest[1]>-4 THEN
    fraicheursignal = 0
    
    ENDIF
    
    IF fraicheursignal=-1 AND bulltest[2]>-4 THEN
    fraicheursignal = -1
    
    ENDIF
    
    IF fraicheursignal=-1 AND bulltest[3]>-4 THEN
    fraicheursignal = -2
    
    ENDIF
    
    
    
    endif
    
    
    screener[bulltest or beartest] (fraicheursignal as "bull or bear?")

    Hi Nicolas,

    I am trying to insert a condition on the freshness of the signal but I am missing something apparently;

    Can you help us?

    Best,

    Chris

    #105659 quote
    Nicolas
    Keymaster
    Master

    To be more clear, you just want to know how many bars ago the bulltest or beartest signal occurred?

    #126633 quote
    Meta Signals Pro
    Participant
    Veteran

    Hi Nicolas,

    I just realized I am not receiving by mail the answers from the posts (I don’t know if I am the only one) ; that’s why I did not answer you sorry;

    In short yes this is exactly what I am willing to do 😉 thanks

    #127007 quote
    Nicolas
    Keymaster
    Master

    You are late to the party! 😆

    The below code will return results with the freshness of the detection in the sorting criteria column (minus = bearish, plus = bullish). The freshness never exceeds 4 bars ago.

    //PRC_Genesis Matrix | indicator
    //10.09.2018
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted from MT4 indi
    
    timeframe(15 minutes)
    adx15 = ADXR[14]>20
    sto15 = Stochastic[11,3](close)
    sto15bull = sto15>sto15[1]
    sto15bear = sto15<sto15[1]
    
    timeframe(default)
    adx5 = ADXR[14]>20
    sto5 = Stochastic[11,3](close)
    sto5bull = sto5>sto5[1]
    sto5bear = sto5<sto5[1]
    // --- settings
    //TVI_Settings
    TVIr=12
    TVIs=12
    TVIu=5
    //CCI_Settings
    CCIPeriod=20
    //T3_Settings
    T3Period=8
    //GannHiLo_Settings
    GannHiLoPeriod=10
    // --- end of settings
    
    result=0
    
    //TVI (Ticks Volume Indicator)
    Mypoint=pointsize
    UpTicks=(Volume+(Close-Open)/MyPoint)/2
    DownTicks=Volume-UpTicks
    EMAUpTicks=average[TVIr,1](UpTicks)
    EMADownTicks=average[TVIr,1](DownTicks)
    DEMAUpTicks=average[TVIs,1](EMAUpTicks)
    DEMADownTicks=average[TVIs,1](EMADownTicks)
    TVIcalculate=100.0*(DEMAUpTicks-DEMADownTicks)/(DEMAUpTicks+DEMADownTicks)
    TVI=average[TVIu,1](TVIcalculate)
    //ProcessTVI
    if TVI>=TVI[1] then
    result=result+1
    else
    result=result-1
    endif
    
    //CCI (Commodity Channel Index)
    dSig=CCI[CCIPeriod](typicalPrice)
    //ProcessCCI
    if dSig>0 then
    result=result+1
    else
    result=result-1
    endif
    
    //T3
    e1 = ExponentialAverage[T3Period](close)
    e2 = ExponentialAverage[T3Period](e1)
    e3 = ExponentialAverage[T3Period](e2)
    e4 = ExponentialAverage[T3Period](e3)
    e5 = ExponentialAverage[T3Period](e4)
    e6 = ExponentialAverage[T3Period](e5)
    b = 0.618
    b2 = (b * b)
    b3 = (b * b * b)
    c1 = -b3
    c2 = (3 * b2) + (3 * b3)
    c3 = (-6 * b2) - (3 * b) - (3 * b3)
    c4 = 1 + (3 * b) + b3 + (3 * b2)
    avg = c1 * e6 + c2 * e5 + c3 * e4 + c4 * e3
    //ProcessT3
    if avg>=avg[1] then
    result=result+1
    else
    result=result-1
    endif
    
    //GannHiLo
    if Close>average[gannhiloperiod](high)[1] then
    gann=1
    elsif Close<average[gannhiloperiod](low)[1] then
    gann=-1
    endif
    //ProcessGann
    if gann>0 then
    result=result+1
    else
    result=result-1
    endif
    
    bulltest = (result=4 and adx5 and adx15 and sto5bull and sto15bull)
    beartest = (result=-4 and adx5 and adx15 and sto5bear and sto15bear)
    
    if bulltest then
    crit=1
    start = barindex
    elsif beartest then
    crit=-1
    start = barindex
    endif
    
    diff = (barindex-start)*crit
    
    test = abs(diff)<=4  
    
    screener[test] (diff as "bull or bear?")

    To subscribe to a topic, there is a button at the right upper side of each first post of the topic.

    hitman045 thanked this post
    #128462 quote
    Meta Signals Pro
    Participant
    Veteran

    😉

    Thanks Nicolas; I see you are still on the dance floor 😉 !!

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

Genesis Matrix & ADX Screener


ProScreener: Market Scanners & Detection

New Reply
Author
author-avatar
eckaw @eckaw Participant
Summary

This topic contains 11 replies,
has 5 voices, and was last updated by Meta Signals Pro
5 years, 10 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 01/20/2019
Status: Active
Attachments: 2 files
Logo Logo
Loading...