Ir para conteúdo
Fórum Script Brasil

Luis Marra

Membros
  • Total de itens

    1
  • Registro em

  • Última visita

Sobre Luis Marra

Luis Marra's Achievements

0

Reputação

  1. int start() {{ int CB=IndicatorCounted(); if(CB<0) return(-1); else if(NB>Bars-CB) NB=Bars-CB; if (NB<100) NB=100; for (SH=1;SH<NB;SH++) { for (R=0,i=SH;i<SH+10;i++) {R+=(10+SH-i)*(High[i]-Low[i]);} R/=55; SHMax = High[Highest(NULL,0,MODE_HIGH,Per,SH)]; SHMin = Low[Lowest(NULL,0,MODE_LOW,Per,SH)]; if (Close[SH]<SHMin+(SHMax-SHMin)*Otstup/100 && UD!=SH_SELL) { BufU[SH]=Low[SH]-R*0.5; UD=SH_SELL; } else {BufU[SH] = EMPTY_VALUE;} TrendDirection= "Down"; if (Close[SH]>SHMax-(SHMax-SHMin)*Otstup/100 && UD!=SH_BUY) { BufD[SH]=High[SH]+R*0.5; UD=SH_BUY; } else {BufD[SH] = EMPTY_VALUE;} TrendDirection= "UP"; } //return(0); } //----------------------- START ALERT FUNCTION if(EnableAlert==true) { if (TrendDirection=="UP")Alert("Sell signal on ", Symbol(), ", TimeFrame: M", Period()); if(TrendDirection=="Down")Alert("Buy signal on ", Symbol(), ", TimeFrame: M", Period()); } //----------------------- END ALERT FUNCTION return(0); } Olá amigos bom dia, tenho esse código acima e não consigo habilitar um alerta pra ele, na condição acima ele fica mandando alerta o tempo todo, gostaria que mandasse um alerta apenas uma vez conforme a condição >>se o ultimo alerta éTrendDirection=="UP"<< então é false caso contrario ele manda alerta e seria a mesma coisa com TrendDirection=="UP desde já obrigado e ajudo a usar o código e digo pra que ele serve OBRIGADO!
×
×
  • Criar Novo...