GMMA and count back line code needed.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #28730 quote
    Pleidian
    Participant
    Average

    Does anyone have code for Daryl Guppys  GMMA ( guppy multiple moving average)  and his CBL (count back line) indicators?

    Pleidian.

    #29398 quote
    Alco
    Participant
    Senior

    I think this is what you are looking for.

    EMA3 = ExponentialAverage[3](close)
    EMA5 = ExponentialAverage[5](close)
    EMA8 = ExponentialAverage[8](close)
    EMA10 = ExponentialAverage[10](close)
    EMA12 = ExponentialAverage[12](close)
    EMA15 = ExponentialAverage[15](close)
    EMA30 = ExponentialAverage[30](close)
    EMA35 = ExponentialAverage[35](close)
    EMA40 = ExponentialAverage[40](close)
    EMA45 = ExponentialAverage[45](close)
    EMA50 = ExponentialAverage[50](close)
    EMA60 = ExponentialAverage[60](close)
    
    
    //Scalp system
    RETURN EMA3 , EMA5  ,EMA8  , EMA10  ,EMA12 , EMA15  ,EMA30 , EMA35 ,EMA40 , EMA45 ,EMA50 , EMA60

    Good luck!

    Nicolas thanked this post
    #30261 quote
    Pleidian
    Participant
    Average

    Thank you Alco, just discovered the code library on PRT website….Just have to find code for the “count back line”, its kinda similar to Super Trend.

    cheers

    Pleidian

    #30371 quote
    Nicolas
    Keymaster
    Master

    Do you have any example or codes from other platform for the “count back line” indicator?

    #36392 quote
    denmar
    Participant
    Veteran

    [From a Metastock forum]

    LIMITATIONS …. With MetaStock, there seems to be a need for two different formulas to handle the issue: – one for the CBL from a LOW (CBLlo), – the other for the CBL from a HIGH (CBLhi). The formulas given below were generated using v.6.52. Because of the use of PREV they won’t work in some earlier MetaStock versions it seems, though a bit of thought should overcome this limitation – anyone able to comment? As written they are based upon relative prices over a DEFAULT cover of 13 days (but adjustable from 3 to 55 days) – this is one of the potential weaknesses which commands individual interpretation for a particular equity or contract, which may cycle more or less frequently and require different timeframes. Other indicators and assessments are, of course, needed to gauge the probability of a CBL-indicated counter-trend holding. Also, for particularly choppy or indecisive circumstances there may be a need to extend the Ref(H or L, -5) to a greater number of comparison days by appropriate copying and adjustments to the basically simple pattern in these formulas – but if it came to this perhaps the trade should be left alone anyway! Owing to price vagaries it is not unusual for a CBLhi to be less than a CBLlo calculation, or the converse, especially with low-gradient trends or sideways price movements.

    NOTE: With each formula below, copy exactly from “HighDays” or “LowDays” down to “PREV )))))” into the Indicator Builder.

    Formula: CBLhi:

    HighDays := Input(“Enter # days to cover last HIGH for CBL calc’n:”, 3, 55, 13);

    If(HIGH < HHV(HIGH, HighDays), {then …} PREV, {previous CBLhi, else…} If(Ref(L,-2) < Ref(L,-1) AND Ref(L,-2) < L AND Ref(L,-1) < L, {then …} Ref(L,-2), {2nd day back low, else…} If((Ref(L,-3)< Ref(L,-2) AND Ref(L,-3) < Ref(L,-1) AND Ref(L,-3) < L) AND (Ref(L,-2)< L OR Ref(L,-1) < L), {then … } Ref(L,-3), {3rd day back low, else…} If((Ref(L,-4)< Ref(L,-3) AND Ref(L,-4) < Ref(L,-2) AND Ref(L,-4) < Ref(L,-1) AND Ref(L,-4) < L) AND (Ref(L,-3)< L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then… } Ref(L,-4), {4th day back low, else…} If((Ref(L,-5)< Ref(L,-4) AND Ref(L,-5) < Ref(L,-3) AND Ref(L,-5) < Ref(L,-2) AND Ref(L,-5) < Ref(L,-1) AND Ref(L,-5) < L) AND (Ref(L,-4)< L OR Ref(L,-3) < L OR Ref(L,-2) < L OR Ref(L,-1) < L), {then …} Ref(L,-5), {5th day back low, else…} PREV )))))

    and for the CBL from a LOW

    CBLlo:

    LowDays := Input(“Enter # days to cover last LOW for CBL calc’n:”, 3, 55, 13);

    If(LOW > LLV(LOW, LowDays), {then …} PREV, {previous CBLlo, else…} If(Ref(H,-2) > Ref(H,-1) AND Ref(H,-2) > H AND Ref(H,-1) > H, {then …} Ref(H,-2), {2nd day back high,else…} If((Ref(H,-3)> Ref(H,-2) AND Ref(H,-3) > Ref(H,-1) AND Ref(H,-3) > H) AND (Ref(H,-2)> H OR Ref(H,-1) > H), {then … } Ref(H,-3), {3rd day back high,else…} If((Ref(H,-4)> Ref(H,-3) AND Ref(H,-4) > Ref(H,-2) AND Ref(H,-4) > Ref(H,-1) AND Ref(H,-4) > H) AND (Ref(H,-3)> H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then… } Ref(H,-4), {4th day back high,else…} If((Ref(H,-5)> Ref(H,-4) AND Ref(H,-5) > Ref(H,-3) AND Ref(H,-5) > Ref(H,-2) AND Ref(H,-5) > Ref(H,-1) AND Ref(H,-5) > H) AND (Ref(H,-4)> H OR Ref(H,-3) > H OR Ref(H,-2) > H OR Ref(H,-1) > H), {then …} Ref(H,-5), {5th day back high,else…} PREV )))))

     

    Excellent description of both the CBL for entry and exit on LONG side – you have to scroll down a bit.

    http://corporatedoctor.com.au/index.html?content=/pages/support/guppy/guppy_trades.html

    #36413 quote
    Nicolas
    Keymaster
    Master

    @denmar
    Do you need CBLhi and CBLlo for prorealtime? The code you have posted seems a bit scrambled and incomplete ..

    #36493 quote
    denmar
    Participant
    Veteran

    Hi Nicolas

    Based upon your comment I actually tried the code in metastock – it plots but the logic is wrong. If you read the description referred to in my post it gives a description and pictures describing what the CBL is designed to do.

    #102021 quote
    Nicolas
    Keymaster
    Master

    The Guppy CBL indicator is already in the library: Guppy’s CBL (Count Back Line)

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

GMMA and count back line code needed.


ProBuilder: Indicators & Custom Tools

New Reply
Author
author-avatar
Pleidian @pleidian Participant
Summary

This topic contains 7 replies,
has 4 voices, and was last updated by Nicolas
6 years, 7 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 03/16/2017
Status: Active
Attachments: No files
Logo Logo
Loading...