Je vous partage un code que j'ai testé avec mon abonnement PRT CAC intraday. Ca ne donne pas grand chose, mais bon... peut-être que ça peut donner des idées. On peut remplacer le momentum par le RSI...
A exécuter en 1H
Code : #
// Définition des paramètres du code
DEFPARAM CumulateOrders = False // Cumul des positions désactivé
NbContrats = 1
StopLossNbPoints = targetProfitNbPoints / ratioGL
IF DAYOFWEEK <> 0 THEN // pas de trade le dimanche
monMomentum = Momentum[19]
IF TIME = 160000 THEN
SELL AT MARKET
EXITSHORT AT MARKET
ENDIF
IF NOT ONMARKET THEN
IF TIME = 100000 THEN
IF open > close[1] + nbMinPointsForGap AND open < close[1] + nbMinPointsForGap + maxGapSize THEN
isGapHaussier = 1
isGapBaissier = 0
ELSIF open < close[1] - nbMinPointsForGap AND open > close[1] - nbMinPointsForGap - maxGapSize THEN
isGapHaussier = 0
isGapBaissier = 1
ELSE
isGapHaussier = 0
isGapBaissier = 0
ENDIF
ENDIF
IF isGapHaussier AND monMomentum CROSSES UNDER 0 THEN
BUY NbContrats CONTRACTS AT MARKET
SET TARGET PROFIT targetProfitNbPoints
SET STOP LOSS StopLossNbPoints
ELSIF isGapBaissier AND monMomentum CROSSES OVER 0 THEN
SELLSHORT NbContrats CONTRACTS AT MARKET
SET TARGET PROFIT targetProfitNbPoints
SET STOP LOSS StopLossNbPoints
ENDIF
ENDIF
ENDIF
nbMinPointsForGap => nombre de points minimum pour le gap
maxGapSize => taille maximummale du gap