CAC40 Trend Following on 10-sec Timeframe

CAC40 Trend Following on 10-sec Timeframe

Hello everyone, it’s been a while since I’ve suggested anything.
So I’m giving you an algo that is profitable to say the least: 113% gains in 1.5 months, from February 13, 2025 to March 28, 2025, from €1000 to €2132, who can beat that???
It can be improved, but it’s already a very good basis for those who like trading.
Don’t hesitate to ask me questions.
See you soon!

 

Share this

Risk disclosure:

No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.

ProRealTime ITF files and other attachments : How to import ITF files into ProRealTime platform?

PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials

  1. David Daget • 22 days ago #

    Salut ! Deja ta premiere proposition était tres novatrice et interessante, et à vue de nez, tu nous envoies du lourd avec le code ci. merci !

    • WE ARE SOCIETY • 21 days ago #

      Salut David et merci. Il est perfectible sur 1 millions de période de 10 secondes mais bon à travailler et améliorer …

  2. Maik2404 • 22 days ago #

    Hallo. Vielen Dank für die Innovation. Wie kann ich eine feste Positionsgröße festlegen ohne Reininvest?

    • WE ARE SOCIETY • 21 days ago #

      Bonjour, il faut modifier la ligne 7 : capital2=capital
      Hallo, Sie müssen Zeile 7 ändern : capital2=capital

    • Maik2404 • 21 days ago #

      Danke

  3. JEROME42570 • 22 days ago #

    hello merci pour le partage. Quand je veux mettre ta stratégie en backtest j ai un message comme quoi mon timefram n est pas bon pour le test. est ce que tu peux m aider?? merci a toi.

  4. Maik2404 • 22 days ago #

    Hallo. Vielen Dank für die Innovation. Können Sie mir sagen wie ich eine feste Positionsgröße bestimmen kann ohne Re Invest? Gruß Maik

  5. WE ARE SOCIETY • 21 days ago #

    On modifie la ligne 63 suite à mauvais trade lundi 31/03/2025 matin à la vente :
    if (time>154000 and time112500 and time091800 and time151500 and time104500 and time132000 and time150000 and time160200 and time100000 and time112500 and time<124500 and close<lowest[30][1]+8))or (dayofweek=2 and ((time144500 or time<150000)) and (close103000 and time=100000 and time=133000 and time140000 and time144000 and time100000 and time143000) or (time>090500 and time132000 and time150000 and time120000 and time113000) or (dayofweek=1 and close>091000 and time<103000) then
    stopv=1
    else
    stopv=0
    endif

    • Maik2404 • 21 days ago #

      kann die Änderung leider nicht einfügen.erhalte immer eine Fehlermeldung.

  6. fifi743 • 21 days ago #

    merci pour le partage

    • WE ARE SOCIETY • 21 days ago #

      Hello @fifi743, ça fait longtemps !! Toujours dans la programmation vectorielle ? Dax ? DJ ?

    • WE ARE SOCIETY • 20 days ago #

      @Maik2404 en fait il s’agit des lignes de 63 à 67 que l’on remplace mais dans ma correction les lignes de 64 à 67 sont identiques mais tu ne dois pas les mettre en double

  7. greg2104 • 21 days ago #

    Stratégie suroptimisée – backtestée sur plusieurs périodes aléatoires les années précdentes – ne fonctionne pas du tout
    Désolé…

    • Maik2404 • 21 days ago #

      Du musst im 10 sek Zeitrahmen und CAC testen. Dann funktioniert es auch 😉

    • WE ARE SOCIETY • 21 days ago #

      Bonjour @greg2104, tu n’as pas à être désolé, ne sois pas triste ! Ici il n’ a jamais été le sujet de faire un algo robuste sur plusieurs années !!! Je ne sais même pas si c’est réalisable, même les banques ont plusieurs algos suivant les périodes. Quand tu as un algo qui va bien sur 1 mois, c’est déjà pas mal, ensuite c’est à toi de mettre à jour les variables suivant la volatilité du marché, sauf si tu as la solution pour automatiser. Je vois que tu es membre que depuis février 2025. Tu vas certainement déchanter si tu penses qu’on va te donner un algo robuste à vie ou qu’on va te faire un virement bancaire sur ce forum !!

  8. vcharlesc • 20 days ago #

    Thank You Boss! let me try

  9. Maik2404 • 19 days ago #

    Hallo. Leider kann ich die Zeile 63 wie besprochen nicht ändern. Es kommt immer die Meldung einer Doppelklammer. Kannst Du den Code noch einmal mit der Änderung zur Verfügung stellen. Danke Dir.

  10. WE ARE SOCIETY • 19 days ago #

    rem algo réalisé par Yann du Nord de la France
    DEFPARAM cumulateOrders = False
    //defparam flatafter = 221500
    timeframe (10 second)
    rem mettre capital disponible
    capital=1000
    capital2=capital+STRATEGYPROFIT[0]
    taille=(capital2/(close*5.5/100))
    if taille<1 then
    taille=1
    endif
    n=taille
    if (time>=090800 and time<170000) then
    journee=1
    else
    journee=0
    endif
    rem les trend en timeframe
    if supertrend[4,4]<=close then
    trend10s=1
    else
    trend10s=0
    endif
    timeframe (1 minute)
    if supertrend[3,10]<=close then
    trend1m=1
    else
    trend1m=0
    endif
    timeframe (2 minute)
    if supertrend[3,10]<=close then
    trend2m=1
    else
    trend2m=0
    endif
    timeframe (3 minute)
    if supertrend[5,12]<=close then
    trend3m=1
    else
    trend3m=0
    endif
    timeframe (10 minute)
    if supertrend[3,10]<=close then
    trend10m=1
    else
    trend10m=0
    endif
    timeframe (21 minute)
    if supertrend[3,10]<=close then
    trend21m=1
    else
    trend21m=0
    endif
    timeframe (30 second)
    if (supertrend[2,2])=<close then
    trend30s=1
    else
    trend30s=0
    endif
    rem les conditions horaires et de prix pour vente
    conda=not onmarket or(shortonmarket and (tradeprice-close)>=-2)
    condav=not onmarket or (longonmarket and (close-tradeprice)>=-1)
    if (time>154000 and time<160000) or (time>112500 and time<120000) or (time>091800 and time<100000) or (dayofweek=1 and time>151500 and time<153500) or (dayofweek=2 and ((time>104500 and time<130000) or (time>132000 and time<133000) or (time>150000 and time<153500) or (time>160200 and time<161500))) or (dayofweek=1 and (time>100000 and time<111500) or (time>112500 and time<124500 and close<lowest[30][1]+8)) or (dayofweek=2 and ((time<120000 or (time>144500 or time<150000)) and (close<lowest[10][1]+13 or trend2m=1))) or (dayofweek=4 and ((time>103000 and time<121500) or (time>=100000 and time=<103000 and close<lowest[10][1]+7) or (time>152500 and trend1m=1) or (time>133000 and time<=150000) or ((close<lowest[10][1]+10 or trend10m=1) and (time<100000 or time>151500) or (time>120000 and trend21m=1)))) or (dayofweek=5 and ((time>140000 and time<143000) or (time>144000 and time<153500) or (trend1m=1 and time<120000) or (time>091500 and time<100000 and close<lowest[10][1]+20) or (time>100000 and close<lowest[10][1]+18))) or (dayofweek=3 and ((trend21m=1 and time>092000)or (time>090500 and close<lowest[10][1]+1))) or (dayofweek=1 and trend21m=1) or (dayofweek=4 and time>091000) or (dayofweek=3 and ((time>100000 and time<120000) or (time>143000) or (time>090500 and time<093000))) or (time>132000 and time<144000) or (dayofweek=1 and time>150000 and time<155000) or (dayofweek=5 and time<092000) or (dayofweek=1 and (time>160000 or (time>120000 and time<133000))) or (dayofweek=3 and time>113000) or (dayofweek=1 and close<lowest[10][1]+10 and time>091000 and time<103000) then
    stopv=1
    else
    stopv=0
    endif
    rem les conditions horaires et de prix pour achat
    if (time>152000 and time<154500) or (time>165500 and time<171000) or (time>160000 and time<163000) or (time>091400 and time<092000) or (time>120000 and time<124500) or (dayofweek=1 and ((time>130000 and time<150000) or (trend2m=0 and time<110000)) or (close>highest[10][1]-12 and (time<103000 or time>150000))) or (dayofweek=2 and (time<120000 or (time>135700 and time<150000) or time>163000 )and close>highest[10][1]-20) or (dayofweek=4 and ((time>154500 and time<165500) or (time<094500) or (close>highest[10][1]-7))) or (dayofweek=5 and ((time>091500 and time<110000) or (time>124500 and time<134500) or trend3m=0 or close>highest[10][1]-10 or (time>143000 and time<145900 and trend21m=0))) or (dayofweek=3 and ((time>145000 and time<160500) or (time>092000 and close>highest[100][1]-23) or trend10m=0)) or (dayofweek=4 and ((time>104500 and time<133000) or (time>140000 and time<144000))) or (dayofweek=3 and time<113000) or (dayofweek=1 and time>150000 and time<155000) or (time>130000 and time<133000) or (dayofweek=2 and time>134500 and time<143000) then
    stopa=1
    else
    stopa=0
    endif
    rem partie execution
    timeframe (1 minute)
    if journee=1 and (AverageTrueRange[1](close) crosses over AverageTrueRange[6](close)) and (close<highest[5][1]-6) and trend3m=1 and conda and stopa=0 THEN
    BUY n contract at market
    set target profit 80
    endif

    if journee=1 and (AverageTrueRange[1](close) crosses under AverageTrueRange[3](close)) and (close>lowest[10][1]+6) and trend3m=0 and condav and time<162000 and stopv=0 then
    sellshort n share at market
    set target profit 80
    endif
    set stop loss 35
    rem gerer les moments delicats et retournements de tendance
    if dayofweek=1 and longonmarket and time>=153000 and Stochastic[10,3](close) crosses over 80then
    sell at market
    endif
    if dayofweek=1 and shortonmarket then
    set target profit 5
    endif
    if dayofweek=1 and longonmarket and time>110000 and time<133000 then
    set target profit 10
    endif
    if dayofweek=1 and longonmarket and time<=110000 then
    set target profit 1
    endif
    if dayofweek=1 and longonmarket and time>=133000 then
    set target profit 5
    endif
    if (dayofweek=2 or dayofweek=5) and longonmarket and time>130000 and time<143000then
    set target profit 2
    endif
    if dayofweek=2 and shortonmarket then
    set target profit 5
    endif
    if close<tradeprice and (dayofweek=2) and shortonmarket and Stochastic[10,3](close) crosses under 20 then
    exitshort at market
    endif
    if close<tradeprice and (dayofweek=3) and time>160000 and shortonmarket and Stochastic[10,3](close) crosses under 20 then
    exitshort at market
    endif
    if dayofweek=1 and (time<094500 or time>160000) and shortonmarket then
    set target profit 1
    endif
    if dayofweek=1 and time>130000 and time<150000 and longonmarket and Stochastic[10,3](close) crosses under 81 and close-tradeprice>40 then
    sell at market
    endif
    if dayofweek=4 and shortonmarket and time>101500 and time<133000 then
    set target profit 30
    endif
    if dayofweek=3 and longonmarket and time>120000 and time<160000 then
    set target profit 10
    endif
    if dayofweek=3 and longonmarket and time>=160000 then
    set target profit 10
    endif
    if dayofweek=3 and shortonmarket then
    set target profit 1
    endif
    if dayofweek=4 and longonmarket and time>110000 and time<150000 then
    set target profit 1
    endif
    if dayofweek=4 and longonmarket and time>=150000 and time<163000 then
    set target profit 45
    endif
    if dayofweek=4 and close>tradeprice and longonmarket and time>170000 and stochastic[10,3](close) crosses under 80 then
    sell at market
    endif
    if (dayofweek=5 or dayofweek=4)and time>100000 and time<143000 and longonmarket and (close-tradeprice>1) then
    sell at market
    endif
    if (dayofweek=5or dayofweek=3) and shortonmarket and time>160000 then
    set target profit 15
    endif
    if dayofweek=5 and longonmarket and time>163000 then
    set target profit 20
    endif
    if year=2024 and ((month=11 and day=29) or (month=12 and day=27)) and longonmarket then
    set target profit 50
    endif
    if year=2025 and ((month=1 and day=31) or (month=2 and day=28)) and longonmarket then
    set target profit 50
    endif
    if longonmarket and close-tradeprice>0 and RSI[14](close) crosses under 95 then
    sell at market
    endif
    if shortonmarket and tradeprice-close>0 and RSI[14](close) crosses over 13 then
    exitshort at market
    endif

    • YvesRobert • 8 days ago #

      Bonjour WE ARE SOCIETY, ce sont en fait les conditions horaires et de prix pour achat qu’on change dans le programme afin essayer d’avoir un gain, c’est ça ?
      D’une semaine à l’autre c’est ça ?
      Qu’est ce qui fait que l’on puisse connaitre à l’avance comment réagira le CAC ?
      Merci

  11. WE ARE SOCIETY • 19 days ago #

    @Maik2404 it’s Done !

  12. Maik2404 • 19 days ago #

    ich bekomme immer noch einen Fehler. Jetzt in Zeile 22 endif timeframe. könntest du vielleicht die itf. Datei zur Verfügung stellen.

  13. Maik2404 • 18 days ago #

    hab eigentlich nur ich das Problem?

  14. WE ARE SOCIETY • 18 days ago #

    Hallo, vielleicht hast du eine eingeschränkte oder limitierte Version, dieser Code funktioniert normalerweise

  15. Maik2404 • 16 days ago #

    deine oben eingestellte itf Datei funktioniert. Ich bekomme nur den Fehler beim ersetzen deiner Zeile 63. ich habe die vollversion von Prorealtime v 12

avatar
Register or

Likes

avatar avatar avatar avatar avatar
Related users ' posts
pdrh Bonjour WE ARE SOCIETY,Vous optimisez toujours votre Algo chaque
WE ARE SOCIETY Bonjour, je l'optimise et l'améliore chaque semaine en évitant au maximum les interdictions ...
dammon c'est un bien beau code que tu nous sors là. il m'a fallu du temps pour bien tout comprendre...
Stanko Ciao Crusoe, grazie per il commento: confermo che il trailing stop non funziona bene. Provo ...
taklause I was wondering, you said it works on the 1 min Chart, but you never use it in the code as t...
Stanko Ciao taklause. Utilizzando il grafico a 1 minuto e fino al grafico a 15 minuti il codice fun...
YvesRobert Hello davidelaferla, how do you put a stop loss and where exactly ? the moment you enter on ...
Hypersimo Buongiorno Davide a quale distanza inserire stop loss e tp nella strategia? grazie
beanpole Thank you for sharing the code. I applied it to the "CAC40 Index" on Euronext market on a da...
ProRealAlgos.com Hi JohnScher. Yes I think you refer to the strategy called "Turnaround tuesday". This strate...
JohnScher I am not alluding to the turnaround tuesday. The general opinion is that Turnaroundtuesday ...
ProRealAlgos.com Yeah that's maybe not of importance. Anyway. Enjoy! :)
Patrice210 bonjour STANKO, effectivement la première ligne apparait en anomalie et je ne comprend pas v...
KumoNoJuzza Hi guys, Thanks @Stanko and everyone for your contributions. I have been playing around ...
Stanko Hi KumoNoJuzza, thanks for the post. I also tried your code with Dax and the performance is ...
Dom Hello, hello....je commence le trading et découvre par la même occasion le codage....et ce n...
Nicolas Merci, ça fait plaisir !
Be-n Bonjour tout le monde ! Dans l'indicateur de tendance, j'ai du mal à saisir la nuance entre ...
Francesco78 Hi CKW, yes I do run it live, and so far I had no problem, which kind of errors?
JohnScher Hello Francesco. Are you still active with the Threeliner? I also follow that, that you ...
fatlung Hi Francesco May I know the time zone applicable to this strategy?
Doctrading Yes, nice idea.
noisette I tried some backtests with "9:30 MACD" with "Breakout strategy" but results are much better...
Doctrading Hello, can you send us your code ?
TradSuz C'est étrange, je note donc à nouveau les deux horaires achat et vente =9H/17H, le iRSI de l...
TradSuz Merci à Doctrading pour cette trame de code super et qui marche sur d'autres supports aussi....
Bibi83 Bonsoir à tous Juste pour vous informer que j'ai enlever les conditions short et que cela ...
Wisko But the BUY-trigger is below the High of the first two 15min-candels?
Nicolas That's right, because what we want is to enter the market quickly and not wait for the next ...
Wisko Then I don't understand the backtest data. Yesterday (28.9.) range was from ~ 4410,5 - 4450,...

Top