Test performance algo trading
Forums › ProRealTime forum Français › Support ProOrder › Test performance algo trading
- This topic has 4 replies, 2 voices, and was last updated 1 month ago by
robertogozzi.
-
-
10/18/2025 at 1:22 PM #252721
Bonjour,
j’ai un algorithme de trading qui fonctionne la nuit (DEFPARAM FLATBEFORE = 000600 DEFPARAM FLATAFTER = 090000).
Il a un arrêt automatique (QUIT) si le gain de la nuit est supérieur à 100,00$ ou la perte supérieure à 100$ (IF STRATEGYPROFIT >= 150 OR STRATEGYPROFIT <= -100 THEN QUIT ENDIF).
Comment puis-je tester cet algorithme sur plusieurs mois, tout en conservant l’arrêt automatique sur la performance de la journée. Je peux le tester en enlevant les conditions de gain ou perte journalière mais le résultat n’est pas précis.
Merci par avance pour votre réponse
10/18/2025 at 6:03 PM #252727Vous pouvez le faire aussi longtemps que vous le souhaitez, mais vous devez le relancer à chaque fois que vous l’interrompez avec QUIT.
Si, toutefois, vous souhaitez qu’il s’arrête pour le reste de la journée, mais reprenne automatiquement le lendemain, vous devez utiliser une variable comme dans cet exemple (TradeON) :
1234567891011121314151617181920212223DEFPARAM FLATBEFORE = 000600 //00:06DEFPARAM FLATAFTER = 090000 //09:00ONCE TradeON = 1ONCE MaxProfit = 100ONCE MaxLoss = MaxProfit //or 100, or 150, etc...IF ((StrategyProfit - StrategyProfit[1]) >= MaxProfit) OR ((StrategyProfit - StrategyProfit[1]) <= -MaxLoss) THENSELL AT MARKETEXITSHORT AT MARKETTradeON = 0ENDIFIF IntraDayBarIndex = 0 THENTradeON = 1ENDIFSma = average[20,0](close)MyLongConditions = Not OnMarket AND TradeON AND close CROSSES OVER SmaMyShortConditions = Not OnMarket AND TradeON AND close CROSSES UNDER SmaIF MyLongConditions THENBUY 1 CONTRACT AT MARKETELSIF MyShortConditions THENSELLSHORT 1 CONTRACT AT MARKETENDIFSET STOP %LOSS 0.3 //0.3%SET TARGET %PROFIT 0.6 //0.6%1 user thanked author for this post.
10/19/2025 at 12:20 PM #25273210/20/2025 at 12:23 AM #252745Bonjour j’ai testé ce programme mais pour moi il ne fonctionne pas.
Je l’ai essayé sur le micro ES entre le premier septembre et le 17 octobre sur des barres de 5 min. Il ne respecte pas la condition max profit limitée à 100 dollars. Peut-être faut-il changer l’unité de temps dans le programme car on travaille à la fois sur des jours et sur des périodes de 5 min ?
10/22/2025 at 11:08 AM #252801STRATEGYPROFIT se met à jour à la clôture d’une transaction, vous ne pouvez donc pas limiter vos gains ni vos pertes.
Utilisez cette version modifiée ; elle est plus simple et clôture chaque transaction lorsque vous atteignez un gain ou une perte de 100 € ou -100 €. Elle peut également clôturer à l’heure spécifiée:1234567891011121314151617181920DEFPARAM FLATBEFORE = 000600 //00:06DEFPARAM FLATAFTER = 090000 //09:00ONCE TradeON = 1ONCE MaxProfit = 100ONCE MaxLoss = MaxProfit //or 100, or 150, etc...IF IntraDayBarIndex = 0 THENTradeON = 1ENDIFSma = average[20,0](close)MyLongConditions = Not OnMarket AND TradeON AND close CROSSES OVER SmaMyShortConditions = Not OnMarket AND TradeON AND close CROSSES UNDER SmaIF MyLongConditions THENBUY 1 CONTRACT AT MARKETTradeON = 0ELSIF MyShortConditions THENSELLSHORT 1 CONTRACT AT MARKETTradeON = 0ENDIFSET STOP $LOSS MaxLossSET TARGET $PROFIT MaxProfit -
AuthorPosts
Find exclusive trading pro-tools on 