Professional Documents
Culture Documents
Martelo Na Vwap
Martelo Na Vwap
begin
// Bloco de entrada
and (time<1600)
then
begin
candle:=0;
chave:=0;
// Condições de compra
if (low<VWAP(1))
and (close>VWAP(1))
and (C_Hammer_HangingMan(100,100,100,100)=1)
and (close>mediaExp(20,close))
or (low<mediaExp(20,close))
and (close>mediaExp(20,close))
and (close[1]>mediaExp(20,close))
and (close[2]>mediaExp(20,close))
then
begin
paintBar(clLime);
BuyStop(high,high);
end;
// Condições de venda
if (high>VWAP(1))
and (close<VWAP(1))
and (C_Hammer_HangingMan(100,100,100,100)=1)
and (close<mediaExp(20,close))
or (high>mediaExp(20,close))
and (close<mediaExp(20,close))
and (close[1]<mediaExp(20,close))
and (close[2]<mediaExp(20,close))
then
begin
paintBar(clRed);
SellShortStop(low,low);
end;
end;
//Bloco de saídas
begin
begin
stopquesobe:=hiloActivator(7);
chave:=1;
end;
// Stop Hilo
if (chave=1) then
SellToCoverStop(stopquesobe,stopquesobe);
// Stop original
if (chave=0) then
SellToCoverStop(BuyPrice-400,(BuyPrice-400));
end;
if (SellPosition = 1) then
begin
// o momento em que começa a subir
begin
stopquedesce:=hiloActivator(7);
chave:=1;
end;
// Stop Hilo
if (chave=1) then
BuyToCoverStop(stopquedesce,stopquedesce);
// Stop original
if (chave=0) then
BuyToCoverStop(SellPrice+400,(SellPrice+400));
end;
end;
begin
end;