Salve a tutti, avrei bisogno del vostro aiuto. Ho un indicatore per Visual Trader che vorrei tradurre in Pro Real Time. L’indicatore consiste nel colorare la parte del grafico di verde quando e’ long e di rosa quando e’ short. Le condizioni per long e short sono scritte nella formula in basso. Grazie anticipatamente.
VAR: MOVL62, MOVL31, MOVL16, MOVL8, MOVL4, MOVM, MIADIFF(0),MOVMM,
MOVL62= MOV(L,62,E);
MOVL31= MOV(L,31,E);
MOVL16= MOV(L,16,E);
MOVL8= MOV(L,8,E);
MOVL4= MOV(L,4,E);
MOVM= mov(l,16,e);
MIADIFF= DIFF(L,MOVM,sub);
MOVMM= mov(MIADIFF,16,e);
IF MIADIFF > MOVMM AND
MOVL4 > MOVL62 AND MOVL4 > MOVL31 AND MOVL4 > MOVL16 AND MOVL4 > MOVL8 AND
MOVL8 > MOVL62 AND MOVL8 > MOVL31 AND MOVL8 > MOVL16 AND
MOVL16 > MOVL62 AND MOVL16 > MOVL31 AND
MOVL31 > MOVL62 AND
C > MOVL62 AND C > MOVL31 AND C > MOVL16 AND C > MOVL8 AND C > MOVL4 THEN
ENTERLONG(NEXTBAR,ATOPEN);
ENDIF;
IF C < MOVL62 THEN
EXITLONG(NEXTBAR,ATOPEN);
ENDIF;
IF MIADIFF < MOVMM AND
MOVL4 < MOVL62 AND MOVL4 < MOVL31 AND MOVL4 < MOVL16 AND MOVL4 < MOVL8 AND
MOVL8 < MOVL62 AND MOVL8 < MOVL31 AND MOVL8 < MOVL16 AND
MOVL16 < MOVL62 AND MOVL16 < MOVL31 AND
MOVL31 < MOVL62 AND
C < MOVL62 AND C < MOVL31 AND C < MOVL16 AND C < MOVL8 AND C < MOVL4 THEN
ENTERSHORT(NEXTBAR,ATOPEN);
ENDIF;
IF C > MOVL62 THEN
EXITSHORT(NEXTBAR,ATOPEN);
ENDIF;