Flat su Visual Trader

NAKATA

Nuovo forumer
Carissimi volevo chiederVi,visto che utilizzo Visual Trader Pro,
se era possibile installare il takeprofit o lo stoploss
e che una volta raggiunto uno dei due il trading system non rientri in posizione bensi'
aspetti il segnale contrario dell'operazione precedente per rientrare in posizione.
Vorrei avere la stringa di comando per non farlo rientrare in posizione dopo un'uscita in takeprofit o
stoploss aspettando il segnale successivo contrario dell'operazione precedente.
Spero di essere stato chiaro e ringraziandovi anticipatamente vi allego un banale T.S. a cui vorrei aggiungere tale operativita'.


{*******************************************************
**** Trading System creato con il Wizard di VT ***
********************************************************}
Var: miavar(0),MioSTOCHK0,MioSTOCHD1;
Var: miavar(0),MioMACD0,MioMACDSIGN1;
MioSTOCHK0 = STOCHK(C, 70, 70);
MioSTOCHD1 = STOCHD(C, 70, 70, 35);
MioMACD0 = MACD(C, 36, 78);
MioMACDSIGN1 = MACDSIGN(C, 36, 78, 18);

///////////////////////////////////////////////////////////////
installstoploss(inperc,2,"TAKE",EXITONLYIFCLOSEON) ;
installtakeprofit(inperc,2,"TAKE",EXITONLYIFCLOSEON);
///////////////////////////////////////////////////////////////
SECTION_ENTERLONG:
if (MioMACD0 > MioMACDSIGN1 and MioSTOCHK0 > MioSTOCHD1) then
EnterLong(NextBar, AtOpen);
endif;
END_SECTION
SECTION_EXITLONG:
if (MioMACD0 < MioMACDSIGN1 and MioSTOCHK0 < MioSTOCHD1) then
ExitLong(NextBar, AtOpen);
endif;
END_SECTION

SECTION_ENTERSHORT:
if (MioMACD0 < MioMACDSIGN1 and MioSTOCHK0 < MioSTOCHD1) then
EnterShort(NextBar, AtOpen);
endif;
END_SECTION
SECTION_EXITSHORT:
if (MioMACD0 > MioMACDSIGN1 and MioSTOCHK0 > MioSTOCHD1) then
ExitShort(NextBar, AtOpen);
endif;
END_SECTION
 

Users who are viewing this thread

Back
Alto