Convert Indicator & Strategy to Screener (Gann Market Model)

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #75048 quote
    Bos.
    Participant
    Veteran

    Hi folks,

    i’m wondering if someone might be able to convert the strategy posted by Odin, as found here: https://www.prorealcode.com/prorealtime-trading-strategies/gann-market-model-short-term-correction-strategy/ and also attached, into a screener that detects the stocks that meet its criteria and qualifies it as a potential signal via the screener.

    Thanks,

    A.

    Gann-Market-Model-Strategy.itf reference.jpg reference.jpg
    #75064 quote
    Nicolas
    Keymaster
    Master

    Not tested, but you could try by yourself with this code:

    //short term
    a1= ExponentialAverage[50](high)[1]
    b1=ExponentialAverage[50](low)[1]
    if close > a1 then
     c1 = 1
    Else
     IF close < b1 then
      c1=-1
     endif
    ENDIF
    if c1= -1 then
     D1 = a1
     
    ELSE
     D1=b1
     
    endif
     
    a2= ExponentialAverage[100](high)[1]
    b2=ExponentialAverage[100](low)[1]
    if close > a2 then
     c2 = 1
     Else
     IF close < b2 then
      c2=-1
     endif
    ENDIF
    if c2= -1 then
     D2 = a2
     
    ELSE
     D2=b2
     
    endif
     
    a3= Average[200](high)[1]
    b3=Average[200](low)[1]
    if close > a3 then
     c3 = 1
     Else
     IF close < b3 then
      c3=-1
     endif
    ENDIF
    if c3= -1 then
     D3 = a3
     
    ELSE
     D3=b3
     
    endif
     
    if D1 < close then
    result = 1
    else
    result = 0
    endif
     
    if D2 < close then
     result1 = 1
    else
     result1 = 0
    endif
     
    if D3 < close then
     result2 = 1
    else
     result2 = 0
    endif
     
    c10 = (result+result1+result2)
    
    test = c10=3 and c10[1]<>3
    
    screener[test]

    I changed the EMA200 to a MA200 (EMA200 needs much more data than a simple moving average and could not be correctly calculated by ProScreener with its 254 bars limitations).

    #75067 quote
    Bos.
    Participant
    Veteran

    Hi Nicolas,

    thanks for taking the time to do this. It appears to work as it should at first glance.

    Thanks again

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

Convert Indicator & Strategy to Screener (Gann Market Model)


ProScreener: Market Scanners & Detection

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Bos.
7 years, 8 months ago.

Topic Details
Forum: ProScreener: Market Scanners & Detection
Language: English
Started: 07/02/2018
Status: Active
Attachments: 2 files
Logo Logo
Loading...