Hybrid Robo-advisor

Tuesday, May 5, 2015

Ichimoku Cloud anche per Multicharts (power language)

Accontentiamo anche chi ha richiesto l'Ichimoku Cloud per Multicharts (o Tradestation). Eccolo in formato eseguibile QUI e di seguito in formato testo:


//Ikarius 2011
Input:Tenkan(9),Kijun(26) ,Chikou(26),SenkouA(26),SenkouB(52);
Var:TS(0),KS(0),CS(0),SA( 0),SB(0);

Value1 = Highest(H,Tenkan);
Value2 = Lowest(L,Tenkan);

TS = ( Value1 + Value2 ) /2;

Value3 = Highest ( H, Kijun);
Value4 = Lowest (L, Kijun);

KS = ( Value3 + Value4 ) / 2;

SA = ( TS + KS ) / 2;

Value5 = Highest( H , SenkouB);
Value6 = Lowest ( L , SenkouB);

SB = (Value5 + Value6) / 2;


Plot1(TS,"TS",red);
Plot2(KS,"KS",blue);
Plot3[Chikou](C,"CS",cyan);
Plot4[-SenkouA](SA,"SA");
Plot5[-SenkouB/2](SB,"SB");
Plot6[-SenkouA](SA,"SAC");
Plot7[-SenkouB/2](SB,"SBC");

if SA > SB then
begin
SetPlotColor[-SenkouA]( 6, darkgreen ) ;
SetPlotColor[-SenkouB/2]( 7, darkgreen ) ;
SetPlotColor[-SenkouA]( 4, darkgreen ) ;
SetPlotColor[-SenkouB/2]( 5, darkgreen ) ;
end
else
begin
SetPlotColor[-SenkouA]( 6, darkmagenta ) ;
SetPlotColor[-SenkouB/2]( 7, darkmagenta ) ;
SetPlotColor[-SenkouA]( 4, darkmagenta ) ;
SetPlotColor[-SenkouB/2]( 5, darkmagenta ) ;

end ;


Per visualizzare la nuvola settate SAC ed SBC come in figura da format - study:

 

No comments:

Post a Comment