MGV= massimo gain virtuale
MLV= massimo loss virtuale
Var: wmax,wmin,wmed,vp1,vp2,vp3;
Var: miavar(0),MioSUPERTREND0,maxLastLong,maxGainVirtuale,maxLossVirtuale,MGV,MLV;
if isfirstbarday then
WMAX=H;
WMIN=L;
else
WMAX=iif(H>=WMAX[1],H,WMAX[1]);
WMIN=iif(L<=WMIN[1],L,WMIN[1]);
WMED=wmax-(wmax-wmin)*0.5;
endif;
PlotChart(WMAX,0, green, dot, 1);
PlotChart(WMIN,0, red, dot, 1);
DrawText(2,0 ,D ,wmax , "max.intraday=",wmax , green, 10, 2+3,Alleft);
DrawText(3,0 ,D ,wmin , "min.intraday=",wmin , red, 10, 2+3,Alleft);
/////////////////////////////////////////////////////////////////////////////////
maxGainVirtuale=(((H-positionvalue)/positionvalue)*100);
maxLossVirtuale=(((positionvalue-L)/positionvalue)*100);
if (maxGainVirtuale>MGV)then MGV=maxGainVirtuale;endif;
//endif;
if (maxLossVirtuale>MLV)then MLV=maxLossVirtuale;endif;
if positiondir=0 then MGV=0;endif;
if positiondir=0 then MLV=0;endif;
if positiondir=1 then maxLastLong=Wmax;endif;
MioSUPERTREND0 = SUPERTREND(C, 10, 3);
PlotChart(MioSUPERTREND0, 0, BLUE, solid, 3);
if C > MioSUPERTREND0 then EnterLong(NextBar, AtOpen); endif;
if C < MioSUPERTREND0 then ExitLong(NextBar, AtOpen); endif;
{vp1 = Createviewport(550);
Plotchart(maxLastLong,VP1,GREEN,solid,2);
DrawText(1,vp1 ,D ,maxLastLong , "maxUltimoLong",maxLastLong , red, 10, 2+3,Alleft);
vp2 = Createviewport(550);
Plotchart(maxGainVirtuale,VP2,GREEN,solid,2);
Plotchart(maxLossVirtuale,VP2,RED,solid,2); }
vp3 = Createviewport(550);
Plotchart(MGV,VP3,GREEN,solid,2);
Plotchart(MLV,VP3,RED,solid,2);
DrawText(4,vp3 ,D ,mgv , "%maxGainVirtual",mgv , green, 10, 2+3,Alleft);
DrawText(5,vp3 ,D ,mlv , "%maxLossVirtual",mlv , red, 10, 2+3,Alleft);
MLV= massimo loss virtuale
Var: wmax,wmin,wmed,vp1,vp2,vp3;
Var: miavar(0),MioSUPERTREND0,maxLastLong,maxGainVirtuale,maxLossVirtuale,MGV,MLV;
if isfirstbarday then
WMAX=H;
WMIN=L;
else
WMAX=iif(H>=WMAX[1],H,WMAX[1]);
WMIN=iif(L<=WMIN[1],L,WMIN[1]);
WMED=wmax-(wmax-wmin)*0.5;
endif;
PlotChart(WMAX,0, green, dot, 1);
PlotChart(WMIN,0, red, dot, 1);
DrawText(2,0 ,D ,wmax , "max.intraday=",wmax , green, 10, 2+3,Alleft);
DrawText(3,0 ,D ,wmin , "min.intraday=",wmin , red, 10, 2+3,Alleft);
/////////////////////////////////////////////////////////////////////////////////
maxGainVirtuale=(((H-positionvalue)/positionvalue)*100);
maxLossVirtuale=(((positionvalue-L)/positionvalue)*100);
if (maxGainVirtuale>MGV)then MGV=maxGainVirtuale;endif;
//endif;
if (maxLossVirtuale>MLV)then MLV=maxLossVirtuale;endif;
if positiondir=0 then MGV=0;endif;
if positiondir=0 then MLV=0;endif;
if positiondir=1 then maxLastLong=Wmax;endif;
MioSUPERTREND0 = SUPERTREND(C, 10, 3);
PlotChart(MioSUPERTREND0, 0, BLUE, solid, 3);
if C > MioSUPERTREND0 then EnterLong(NextBar, AtOpen); endif;
if C < MioSUPERTREND0 then ExitLong(NextBar, AtOpen); endif;
{vp1 = Createviewport(550);
Plotchart(maxLastLong,VP1,GREEN,solid,2);
DrawText(1,vp1 ,D ,maxLastLong , "maxUltimoLong",maxLastLong , red, 10, 2+3,Alleft);
vp2 = Createviewport(550);
Plotchart(maxGainVirtuale,VP2,GREEN,solid,2);
Plotchart(maxLossVirtuale,VP2,RED,solid,2); }
vp3 = Createviewport(550);
Plotchart(MGV,VP3,GREEN,solid,2);
Plotchart(MLV,VP3,RED,solid,2);
DrawText(4,vp3 ,D ,mgv , "%maxGainVirtual",mgv , green, 10, 2+3,Alleft);
DrawText(5,vp3 ,D ,mlv , "%maxLossVirtual",mlv , red, 10, 2+3,Alleft);
Buonasera Xavier, ho verificato il ts ma continua a dare sempre i massimi di ogni giorno e non il prezzo massimo raggiunto durante il periodo long di ogni segnale.
ResponderEliminarti metto spiegazione sopra
ResponderEliminar