Announcement

Collapse
No announcement yet.

Cycles Forever

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Cycles Forever

    Goodmorning,

    here is another very interesting study for cycles.

    But have only the metastock script.


    ************************************************** *

    cycle4:=Input("cycle4",0,10,4);
    cycle8:=Input("cycle8",0,16,8);
    cycle16:=Input("cycle16",0,32,16);
    cycle32:=Input("cycle32",0,64,32);
    cycle64:=Input("cycle64",0,128,64);

    P0:=Mov(((C-LLV(L,cycle4))/(HHV(H,cycle4)-LLV(L,cycle4)))*100,3,E);
    P1:=Mov(((C-LLV(L,cycle8))/(HHV(H,cycle8)-LLV(L,cycle8)))*100,3,E);
    P2:=Mov(((C-LLV(L,cycle16))/(HHV(H,cycle16)-LLV(L,cycle16)))*100,3,E);
    P3:=Mov(((C-LLV(L,cycle32))/(HHV(H,cycle32)-LLV(L,cycle32)))*100,3,E);
    P4:=Mov(((C-LLV(L,cycle64))/(HHV(H,cycle64)-LLV(L,cycle64)))*100,3,E);
    A0:=Mov(((P0-LLV(P0,cycle4))/(HHV(P0,cycle4)-LLV(P0,cycle4)))*100,3,E);
    A1:=Mov(((P1-LLV(P1,cycle8))/(HHV(P1,cycle8)-LLV(P1,cycle8)))*100,3,E);
    A2:=Mov(((P2-LLV(P2,cycle16))/(HHV(P2,cycle16)-LLV(P2,cycle16)))*100,3,E);
    A3:=Mov(((P3-LLV(P3,cycle32))/(HHV(P3,cycle32)-LLV(P3,cycle32)))*100,3,E);
    A4:=Mov(((P4-LLV(P4,cycle64))/(HHV(P4,cycle64)-LLV(P4,cycle64)))*100,3,E);
    A0;A1;A2;A3;A4;

    ************************************************** *

    than the average of the cycles


    ************************************************** **

    cycle4:=Input("cycle4",0,10,4);
    cycle8:=Input("cycle8",0,16,8);
    cycle16:=Input("cycle16",0,32,16);
    cycle32:=Input("cycle32",0,64,32);
    cycle64:=Input("cycle64",0,128,64);

    P0:=Mov(((C-LLV(L,cycle4))/(HHV(H,cycle4)-LLV(L,cycle4)))*100,3,E);
    P1:=Mov(((C-LLV(L,cycle8))/(HHV(H,cycle8)-LLV(L,cycle8)))*100,3,E);
    P2:=Mov(((C-LLV(L,cycle16))/(HHV(H,cycle16)-LLV(L,cycle16)))*100,3,E);
    P3:=Mov(((C-LLV(L,cycle32))/(HHV(H,cycle32)-LLV(L,cycle32)))*100,3,E);
    P4:=Mov(((C-LLV(L,cycle64))/(HHV(H,cycle64)-LLV(L,cycle64)))*100,3,E);
    A0:=Mov(((P0-LLV(P0,cycle4))/(HHV(P0,cycle4)-LLV(P0,cycle4)))*100,3,E);
    A1:=Mov(((P1-LLV(P1,cycle8))/(HHV(P1,cycle8)-LLV(P1,cycle8)))*100,3,E);
    A2:=Mov(((P2-LLV(P2,cycle16))/(HHV(P2,cycle16)-LLV(P2,cycle16)))*100,3,E);
    A3:=Mov(((P3-LLV(P3,cycle32))/(HHV(P3,cycle32)-LLV(P3,cycle32)))*100,3,E);
    A4:=Mov(((P4-LLV(P4,cycle64))/(HHV(P4,cycle64)-LLV(P4,cycle64)))*100,3,E);
    MCYCLE:=(A0+A1+A2+A3+A4)/5;
    MCYCLE;

    ************************************************** *

    This average gives good signals when cross above the 20 line and when cross under the 80 line.
    Good signal for a starting cycle.

    Is here somebody who know how translate in esignal efs?

    It' to complex for me but i think that is not too complex for many of you.

    Thanks of all.


    gg

  • #2
    I've tried to make an efs with only the first cycle (4 days)

    but it doesn't plot anything.

    One help please

    ************************************************** **

    var vEMA3 = null;
    var vEMA4 = null;
    var vLastAlert = -1;

    function preMain() {

    setPriceStudy(false);
    setStudyTitle("CYCLES STUDIES");
    setCursorLabelName("CYCLE4", 0);
    setDefaultBarStyle(PS_SOLID, 0);
    setDefaultBarFgColor(Color.red, 0);
    setDefaultBarThickness(1, 0);
    setPlotType(PLOTTYPE_LINE, 0);
    }

    function main() {
    var vEMA3 = ema (3,(((close()-llv(4,low()))/(hhv(4,high())-llv(4,low())))*100));
    var vEMA4 = ema(3,((vEMA3()-llv(4,vEMA3()))/(hhv(4,vEMA3())-llv(4,vEMA3())))*100);
    return vEMA4;
    }

    function onAction1() {
    vLastAlert = 1;
    }


    ************************************************** **

    Comment

    Working...
    X