1 Archivos adjuntos Estoy buscando una manera de encontrar el �ltimo m�ximo y el m�nimo final bas�ndose en promedios m�viles. Las flechas en la imagen adjunta muestran lo que estoy buscando.
No utilizo la tendencia actual de media m�vil. Busco los columpios que quedan �ltimos. He dibujado las l�neas que son los 2'swings' en el Bajo y el Alto.
Comenc� el c�digo (pero creo que mi derrame cerebral est� funcionando mal). Acerca de avanzar m�s y me quedo en blanco.
Me interesa dibujar las l�neas. Obteniendo el valor.
C�digo insertado void OnStart() dual UpperLevel=0, LowerLevel=0, FastMA=0, SlowMA=0; int BarraActual=1, Direcci�nActual=0, �ltimaDirecci�n=0; bool AllFound=false, StillOnInitialDirection=exacto, FoundLong=false, FoundShort=false; while(! AllFound) SlowMA=iMA(NULL,0,10,0,MODE_SMA,PRICE_CLOSE,Curren tBar); FastMA=iMA(NULL,0,5,0,MODE_EMA,PRICE_CLOSE,Current Bar); deber�a (CurrentBar==1)/establecer la gesti�n inicial if(FastMAgt;SlowMA) CurrentDirection=1; �ltima direcci�n=1; if(FastMAlt;SlowMA) CurrentDirection=2; �ltima direcci�n=2; if(CurrentBargt;1)/Trabajar en el liderazgo actual if(FastMAgt;SlowMA) CurrentDirection=1; if(FastMAlt;SlowMA) CurrentDirection=2; if(StillOnInitialDirection)/Veremos si estamos fuera de este liderazgo actual if(CurrentDirection! =LastDirection) StillOnInitialDirection=false; si (! StillOnInitialDirection)