Bonjour,
Je souhaite ouvrir une position tous les jours de la semaine du lundi au vendredi à 0h (1ère barre de l’ouverture de la journée)
et la fermer à 7h par ex, choisir un lot et positionner un stop loss et un take profit.
Merci pour votre aide
Dominique
defparam flatafter=070000
if IntradayBarIndex = 0 then
buy 1 contract at market
set target %profit 2
set stop %loss 2
endif
moi j’ai fait ça:
////Choisir jours d’entrée/sortie
c1 = dayofweek = 1 or 2 or 3 or 4 or 5
////Choisir heure d’entrée/sortie
c5 = time = 000000
c6 = time = 070000
if not onmarket and c1 and c5 then
buy 1 share at market
endif
if onmarket and c1 and c6 then
sell at market
endif
//Stop Loss à -15
SET STOP pTRAILING 10
//Take Profit à +50
SET TARGET pPROFIT 80