COSTRUZIONE INDICATORE PER ANALISI CICLICA CON VISUAL TRADER (1 Viewer)

urka78

Nuovo forumer
Salve ragazzi so che rompo :D ma ne ho estremo bisogno, :(

Allora ne ho trovato il codice in esylanguage che è simile a vt e ho provato a tradurre, ma già alla prima condizione mi dava errore

Posto l'originale in easyl

Codice:
// This indicator labels HH, HL, LL, LH on the chart.
//

inputs:  
    LeftStrength( 3 ) ,  
    RightStrength( 3 ), 
    LookBackLength( 100 );
 
variable:  
    ID(-1), 
    Offset( 0 ) , 
    HighValue1(0),
    HighValue2(0),
    LowValue1(0),
    LowValue2(0);



 
Offset = .15 * Average( Range, 5 ) ; 
 
if PivotHighVSBar( 1, High, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 then 
begin 
    HighValue1 = PivotHighVS(1, High, Leftstrength, RightStrength, LookBackLength );  
    HighValue2 = PivotHighVS(2, High, Leftstrength, RightStrength, LookBackLength );  
 
    if HighValue2 <> -1 and ( ( HighValue1 >= HighValue2 - Offset ) and ( HighValue1 <= HighValue2 + Offset ) ) then  
    begin 
        ID = Text_New(Date[RightStrength], Time[RightStrength], High[RightStrength] + Offset, "DT");  
        Text_SetStyle(ID, 2, 1 ) ; 
        Text_SetColor(ID, darkyellow);

        Value1 = 1;
    end ;  

    if HighValue2 <> -1 and HighValue1 > HighValue2 and value1 = 0 then  
    begin 
        ID = Text_New(Date[RightStrength], Time[RightStrength], High[RightStrength] + Offset, "HH");  
        Text_SetStyle(ID, 2, 1 ) ; 
        Text_SetColor(ID, darkgreen);
    end 
    else 
    if HighValue2 <> -1 and HighValue1 < HighValue2 and value1 = 0 then
    begin
        ID = Text_New(Date[RightStrength], Time[Rightstrength], High[RightStrength] + Offset, "(LH)");
        Text_SetStyle(ID, 2, 1 ) ;
        Text_SetColor(ID, Red);
    end ;
    Value1 = 0;
end ; 
 
if PivotLowVSBar( 1, Low, LeftStrength, RightStrength, RightStrength + 1 ) <> -1 then 
begin 
    LowValue1 = PivotLowVS(1, Low, Leftstrength, RightStrength, LookBackLength );  
    LowValue2 = PivotLowVS(2, Low, Leftstrength, RightStrength, LookBackLength );  
 
    if LowValue2 <> -1 and ( ( LowValue1 >= LowValue2 - Offset ) and ( LowValue1 <= LowValue2 + Offset ) ) then  
    begin 
        ID = Text_New(Date[RightStrength], Time[RightStrength], Low[RightStrength] - Offset, "DB");  
        Text_SetStyle(ID, 2, 0 ) ; 
        Text_SetColor(ID, darkyellow);

        Value1 = 1;
    end;  

    if LowValue2 <> -1 and LowValue1 < LowValue2 and Value1 = 0 then  
    begin  
        ID = Text_New(Date[RightStrength], Time[RightStrength], Low[RightStrength] - Offset, "LL");  
        Text_SetStyle(ID, 2, 0 ) ; 
        Text_SetColor(ID, Red);
    end 
    else 
    
    if LowValue2 <> -1 and LowValue1 > LowValue2 and Value1 = 0 then
    begin
        ID = Text_New(Date[RightStrength], Time[RightStrength], Low[RightStrength] - Offset, "(HL)");
        Text_SetStyle(ID, 2, 0 ) ;
        Text_SetColor(ID, darkgreen);
    end;
    Value1 = 0;
end ;
E quello iniziato da me:

Codice:
input: LeftStrength( 3 ),RightStrength( 3 ),LookBackLength( 100 );

var:ID(-1),Offset( 0 ),HighValue1(0),HighValue2(0),LowValue1(0),LowValue2(0),PivotHighVSBar(0),
PivotHighVS;



Offset = .15*(AvgPrice[5]);

beginfor (ID,OFFSET,LookBackLength);
if PivotHighVSBar(1,H,LeftStrength,RightStrength,RightStrength + 1 ) <> -1 then
HighValue1 = PivotHighVS(1, H, Leftstrength, RightStrength, LookBackLength );
HighValue2 = PivotHighVS(2, H, Leftstrength, RightStrength, LookBackLength );

ENDIF;
ENDFOR;
poi fermarmi è stato d'obbligo perchè non ne venivo più fuori :wall:
 

solospread

Forumer storico
Oggi solo 3 operazioni , ma tutte OK. Ieri ne ha cannate 2 su 6 ma nel complesso và ancora alla grande.
 

Allegati

  • solo 3.JPG
    solo 3.JPG
    182,6 KB · Visite: 166
  • saga dei nani.JPG
    saga dei nani.JPG
    82 KB · Visite: 583

misterx

Nuovo forumer
Per i cicli for ci vuole Misterx, il numero 1 in questo campo.
Se ci sei fatti sentire.........................ciao :up::up::up:

Ciao Solo

che piacere risentirti:up::up:.....e rivedere i tuoi post.....il forum senza il tuo apporto è davvero più spento....

X URKA78.....
appena rientro dalle ferie se non è troppo tardi gli do un'occhiata.....
 

solospread

Forumer storico
Ciao Solo

che piacere risentirti:up::up:.....e rivedere i tuoi post.....il forum senza il tuo apporto è davvero più spento....

X URKA78.....
appena rientro dalle ferie se non è troppo tardi gli do un'occhiata.....
Anche per me è sempre un piacere ritrovarti. Ti auguro di passare delle ottime ferie e ritornare fresco e riposato per ripartire con il lavoro.
Il sistema è corto da 1,2712 e vediamo se và dritta anche stavolta.
 

Allegati

  • ultimo.JPG
    ultimo.JPG
    120,5 KB · Visite: 150

solospread

Forumer storico
La pazienza è la virtu' dei forti. Mancato il profit per 1 pips. Ha fatto il minimo a '02 ed ho profit a '01. Vediamo se ci ritorna.....
 

solospread

Forumer storico
mercato piatto e volumi assenti. Chi si accontenta gode , si chiude a '05 e si và a nanna. Buona notte a tutti. :up::up::up:
 

Allegati

  • 555555555555555555555555555555555555.JPG
    555555555555555555555555555555555555.JPG
    154,9 KB · Visite: 177

solospread

Forumer storico
Ho aggiunto una variante per farlo stare piu' tempo a mercato.
Lo short và meglio del long con 89% contro l'85%. Ho aumentato il profit a 13 pips e lo stop a 30. Se ne canna 1 ce ne vogliono 3 per pareggiare il conto, ma se mantiene il 90% di positività non è certo un problema. Il problema è il mantenimento del 90%:lol::lol::lol:
 

Allegati

  • eqyuity.JPG
    eqyuity.JPG
    52,4 KB · Visite: 949
  • sostituz.JPG
    sostituz.JPG
    84,9 KB · Visite: 914
Ho aggiunto una variante per farlo stare piu' tempo a mercato.
Lo short và meglio del long con 89% contro l'85%. Ho aumentato il profit a 13 pips e lo stop a 30. Se ne canna 1 ce ne vogliono 3 per pareggiare il conto, ma se mantiene il 90% di positività non è certo un problema. Il problema è il mantenimento del 90%:lol::lol::lol:
ciao campione, è disponibile l'ultima versione aggiornata x il popolo ???
cmq buon gain :up::up:
 

Users who are viewing this thread

Alto