53 lines
No EOL
1.3 KiB
Text
53 lines
No EOL
1.3 KiB
Text
//estudos do livro NPP
|
|
|
|
const
|
|
WINFUT=Asset("WINFUT", feedBMF);
|
|
WDOFUT=Asset("WDOFUT", feedBMF);
|
|
BOVA11=Asset("BOVA11", feedBovespa);
|
|
|
|
input
|
|
Periodo(20);
|
|
|
|
var
|
|
i, sum : Integer;
|
|
lista : array[1..10] of Integer;
|
|
winv25 : String;
|
|
winMedia, wdoMedia : Float;
|
|
|
|
|
|
|
|
begin
|
|
|
|
winv25:=Asset("WINV25", feedBMF);
|
|
winMedia:=MediaExp(Periodo, WINFUT.close);
|
|
wdoMedia:=MediaExp(Periodo, WDOFUT.close);
|
|
|
|
PlotText("inicio do dbg",clRed,0,7);
|
|
PlotText("dbg winfut ===>>>"+winv25,clRed,0,7);
|
|
PlotText("tickerBMF:"+WINFUT.GetAsset,clRed,0,7);
|
|
PlotText("tickerBovespa:"+BOVA11.GetAsset,clRed,0,7);
|
|
PlotText("bolsaBMF:"+WINFUT.GetFeed,clRed,0,7);
|
|
PlotText("bolsaBOVA11:"+BOVA11.GetFeed,clRed,0,7);
|
|
|
|
|
|
if(MaxBarsForward() = 0) then
|
|
PlotText("if MaxBarsForward() ", clRed,0,7);
|
|
|
|
if(WDOFUT.close > wdoMedia) and (WINFUT.close < winMedia) then
|
|
PaintBar(clLime);
|
|
else if(WDOFUT.close < wdoMedia) and (WINFUT.close > winMedia ) then
|
|
PaintBar(clAqua);
|
|
end
|
|
|
|
for i:=1 to 10 do
|
|
PlotText("dbg for=>",clBlue,0,7);
|
|
lista[i]:=i;
|
|
PlotText("dbg for lista=>",clBlue,0,7);
|
|
Plot(lista[i]);
|
|
sum:=0;
|
|
|
|
for i:=1 to 10 do
|
|
sum:=sum+1;
|
|
PlotText("dbg for sum=>",clBlue,0,7);
|
|
Plot(sum);
|
|
end; |