Velocizzare il calcolo di Laguerre

Viewing 1 post (of 1 total)
  • Author
    Posts
  • #76865 quote
    ironshirow
    Participant
    Average

    Ciao,

    sto modificando con dei parametri l’indicatore di Laguerre e vorrei velocizzarlo perchè su timeframe da 5min ci mette veramente molto a fare tutti i calcoli.

    come posso fare?

    gamma = 0.6

    IF BarIndex=0 THEN

    L0 = 0
    L1 = 0.15
    L2 = 0.85
    L3 = 0.45
    CU = 0
    CD = 0

    ELSE

    L0 = (1 -gamma)*close+gamma*L0[1]
    //L1 = – gamma *L0 + L0[1] + gamma *L1[1];
    L1 = – gamma*L0 + L0[1] + gamma*L1[1]
    //L2 = – gamma *L1 + L1[1] + gamma *L2[1];
    L2 = – gamma * L1 + L1[1] + gamma*L2[1]
    //L3 = – gamma *L2 + L2[1] + gamma *L3[1];
    L3 = – gamma * L2 + L2[1] + gamma*L2[1]
    CU = 0
    CD = 0

    //If L0 >= L1 then CU = L0 – L1 Else CD = L1 – L0;
    IF L0 >= L1 THEN
    CU = L0 -L1
    ELSE
    CD= L1 – L0
    ENDIF

    //If L1 >= L2 then CU = CU + L1 – L2 Else CD = CD + L2 – L1;
    IF L1 >= L2 THEN
    CU = CU + L1-L2
    ELSE
    CD= CD + L2 – L1
    ENDIF

    //If L2 >= L3 then CU = CU + L2 – L3 Else CD = CD + L3 – L2;
    IF L2 >= L3 THEN
    CU = CU + L2-L3
    ELSE
    CD= CD + L3 – L2
    ENDIF

    //If CU + CD <> 0 then RSI = CU / (CU + CD);
    IF CU + CD <> 0 THEN
    myRSI = CU / (CU + CD)
    ENDIF

    ENDIF

    return myRSI

     

    Grazie

Viewing 1 post (of 1 total)
  • You must be logged in to reply to this topic.

Velocizzare il calcolo di Laguerre


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
ironshirow @ironshirow Participant
Summary

This topic contains 1 voice and has 0 replies.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 07/27/2018
Status: Active
Attachments: No files
Logo Logo
Loading...