Escolar Documentos
Profissional Documentos
Cultura Documentos
Buy or Sell On Candlle
Buy or Sell On Candlle
////////////////////////////////////////////////////////
// //
// //
// GAVAD % //
// //
// //
////////////////////////////////////////////////////////
//sombra
// imprime o GAVAD
//linha do Sinal
Alert = Fura1
////////////////////////////////////////////////////////
// //
// //
// CONDIÇÕES DE OPERACAO //
// //
// //
////////////////////////////////////////////////////////
Sell_Forte2 = SinalON
//Call_Forte2 = SinalON
// //
// //
// CALENDARIO //
// //
// //
////////////////////////////////////////////////////////
//052)
// trading view solicita que se ja informado data para gerar backtest a partir de tal data
Validadia = year >= ano and month >= mes and dayofmonth >= dia
abreloja = year >= ano and month >= mes and dayofmonth >= dia and hour >= horaabertura
//and minute >= minutoabertura)
//nenhuma ordem pode ser aberta depois dessa data e as abertas devem ser fechadas
fechaloja = year >= ano and month >= mes and dayofmonth >= dia and hour >= horaencerra
fechaloja2 = year >= ano and month >= mes and dayofmonth >= dia and hour >= horaencerra
////////////////////////////////////////////////////////
// //
// //
// GERENCIAMENTO DE RISCO //
// //
// //
////////////////////////////////////////////////////////
tamanhodolote = Contratos
//seta stop gain final em pontos (metade da barra anterior)
////////////////////////////////////////////////////////
// //
// Checkbox //
// //
////////////////////////////////////////////////////////
////////////////////////////////////////////////////////
// //
// //
// COMPRA E VENDA //
// //
// //
////////////////////////////////////////////////////////
Tradenumber = strategy.closedtrades + 1
//COMPRA RETORNO
//if (CruzamentoFechaCallGG)
//strategy.close(id="Comprar")
//if (EscapeFechaCall)
// strategy.close(id="Comprar")
//VENDA RETORNO
//if (CruzamentoFechaSellGG)
// strategy.close(id="Vender")
//if (EscapeFechaSell)
// strategy.close(id="Comprar")
//fim do codigo