WE ARE SOCIETY

SCALPING CAC40 10 SECONDS

Category: Strategies By: WE ARE SOCIETY Created: November 3, 2023, 10:15 AM
November 3, 2023, 10:15 AM
Strategies
99 Comments
SCALPING CAC40 10 SECONDS

Here is a Supertrend strategy for very short term trading on French CAC40. Let’s break it down for you. Let’s take a step-by-step look at what this algorithm does.

1. Setup:

  • Timeframes: The primary timeframe for this script is set to 10 seconds, meaning it processes price data every 10 seconds. However, the code switches between various timeframes – from 30 seconds up to 10 minutes – depending on the calculations.
  • Capital & Position Sizing: Your initial capital is set at 500 units, and the position size (the number of shares/contracts to trade) is calculated based on a percentage of the closing price. There’s also a mechanism (MM) to adjust position size based on the strategy’s profit, ensuring you don’t overcommit or underutilize your capital.

2. Identifying Trading Conditions:

The algorithm uses several indicators and conditions to decide when to trade:

  • Supertrend: A common trend-following indicator, this script calculates the Supertrend on multiple timeframes.
  • Day & Time Conditions: The script checks the time of day and day of the week. There are very specific conditions – for instance, a particular hour on a Tuesday or a certain timeframe on Fridays.

3. Trade Execution:

  • Buy Conditions:
    • If the current price is lower than the price 80 bars ago (close[80]).
    • It’s within the trading hours (from 9:10 AM to 5 PM).
    • The stopa condition (a complex mix of time and Supertrend) is not active.

    If all these conditions are met, the algorithm buys n shares at the market price.

  • Sell Conditions:
    • If the current price is higher than the price 30 bars ago (close[30]).
    • It’s within the trading hours (from 9 AM to 5 PM).
    • The stopv condition (another complex mix of time and Supertrend) is not active.

    When these are met, the algorithm sells short n shares at the market price.

4. Risk Management:

  • Stop Loss: After entering a trade, if the price goes against the trade by 38 units, the position will be automatically closed to limit the loss.
  • Target Profit: If the trade reaches a profit of 5 units, it will be closed. This target increases to 6 units if the time is between 4 PM and 5 PM.

Conclusion:

This trading algorithm is built on a combination of trend-following techniques, specific time conditions, and risk management rules. By looking at the current price in relation to past prices and the Supertrend, it makes buy or sell decisions. The added time conditions likely aim to avoid certain market anomalies that can occur at specific times.

It’s essential to test any trading strategy on historical data and in a simulated environment before going live. Remember, past performance doesn’t guarantee future results. Stay safe, and happy trading!

DEFPARAM cumulateOrders = False
//defparam flatafter = 174000
timeframe (10 second)
capital=500
taille=(capital/(close*5.5/100))
MM = 1 // = 1 for optimization
if MM = 0 then
positionsize=taille
ENDIF
if MM = 1 then
ONCE startpositionsize =taille
ONCE factor = 1 // factor of 10 means margin will increase/decrease @ 10% of strategy profit; factor 20 = 5% etc
ONCE factor2 = 2 // tier 2 factor
ONCE margin = (close*.08) // tier 1 margin value of 1 contract in instrument currency; change decimal according to available leverage
ONCE margin2 = (close*.08)// tier 2 margin value of 1 contract in instrument currency; change decimal according to available leverage
ONCE tier1 = 200 // NAS €1 IG first tier margin limit
ONCE maxpositionsize = 2000 // NAS €1 IG tier 2 margin limit
ONCE minpositionsize = 1 // enter minimum position allowed
IF Not OnMarket THEN
positionsize = startpositionsize + Strategyprofit/(factor*margin)
ENDIF
IF Not OnMarket THEN
IF startpositionsize + Strategyprofit/(factor*margin) > tier1 then
positionsize = (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor2*margin2)) + tier1 //incorporating tier 2 margin
ENDIF
IF Not OnMarket THEN
if startpositionsize + Strategyprofit/(factor*margin) < minpositionsize THEN
positionsize = minpositionsize //keeps positionsize from going below allowed minimum
ENDIF
IF (((startpositionsize + (Strategyprofit/(factor*margin))-tier1)*(factor*margin))/(factor2*margin2)) + tier1 > maxpositionsize then
positionsize = maxpositionsize// keeps positionsize from going above IG tier 2 margin limit
ENDIF
ENDIF
ENDIF
ENDIF
n=positionsize
if time=090000 then
ouverture=close
endif
timeframe(10 minute)
if (supertrend[3,10]-6)=<close then
haut10=1
endif
if (supertrend[3,10]+3)>close then
haut10=0
endif
TIMEFRAME(3 minute)
if (supertrend[3,3]-3)=<close then
haut3=1
endif
if (supertrend[3,3]+1)>close then
haut3=0
endif
timeframe (30 second)
if (supertrend[3,6]-1)=<close then
haut30s=1
endif
if (supertrend[3,6]+7)>close then
haut30s=0
endif
timeframe (5 minute)
if (supertrend[3,10]-3)=<close then
haut5m=1
endif
if (supertrend[3,10]+3)>close then
haut5m=0
endif
timeframe (10 second)
rem avant 190 10
if (time>100000 and time<110000) or (time>123500 and time<133000) or (dayofweek=2 and ((time>110000 and time<144000)or time>165000))  or (dayofweek=3 and ((time>121500 and time<131500) or haut3=0)) or (time>160000 and time<161500)  or (dayofweek=1 and time<100000) or (dayofweek=4 and ((haut10=0 or haut3=0) or (time>093000 and time<100000))) or (dayofweek=1 and (haut3=0 or close>(highest[40][1]-10))) or (dayofweek=2 and haut3=0 and time<110000) or (dayofweek=4  and (close>(highest[60][1]-10))) or (dayofweek=5 and close>(highest[60][1]-10)) or (dayofweek=4 and time>153000 and time<170000) or (dayofweek=5 and time<110000) or (haut10=0 and close>(highest[40][1]-15)) or (dayofweek=5 and (haut30s=0 or haut3=0) and time<120000)or (dayofweek=1 and ((haut10=0)  or close>(highest[40][1]-15))) or (dayofweek=3  and time>143000 and haut30s=0) or ((dayofweek=4 or dayofweek=1) and haut5m=0) or ((dayofweek=4) and (close>(highest[50][1]-15)) and time<153000) or (dayofweek=5 and time>152900 and time<154000) or (dayofweek=5 and haut30s=0 and time>140000 and time<153500) or ((dayofweek=2 or dayofweek=3) and (time>150000 and time<153500)) or (dayofweek=2 and time>152900 and time<154500)or (dayofweek=3 and  time>110000 and time<113500) or (time>=161500 and time<163000) or (dayofweek=5 and haut30s=0) then
stopa=1
else
stopa=0
endif
rem
if (time>=100000 and time<103000) or (time>130500 and time<140000) or (dayofweek=5 and (time>103000 and time<121000)) or (dayofweek=4 and close<(lowest[45][1]+12)) or (dayofweek=2 and (haut3=1 or haut30s=1)) or (dayofweek=4 and haut3=1) or ((dayofweek=5 or dayofweek=3) and (close<(lowest[150][1]+19) or (close<(lowest[60][1]+25))))  or (time>162500 and time<170000) or (dayofweek=1 and (close<(lowest[40][1]+10) or (time>=091000 and time<104500))) or (time>093000 and time<100000) or (dayofweek=2 and time>120000 and time<130000) or (dayofweek=4 and ((time>111500 and time<130000) or (time>144500 and time<150000))) or (dayofweek=1 and haut3=1) or ((dayofweek=4 or dayofweek=5) and ((close<(lowest[150][1]+21)) or (time>151000 and time<153000))) or (dayofweek=4 and time<091000) or (dayofweek=4 and (close<(lowest[50][1]+15))) or (dayofweek=2 and ((time>110000 and time<111500) or (time>142500 and time<150000))) or (dayofweek=1 and time>133000 and time<143000) or (dayofweek=2 and time>161000 and time<163000) or (close<lowest[90][1]+10) or (dayofweek=2 and time>150000 and time<153000) or (dayofweek=1 and ((haut10=1) or (time>120000 and time<130000 and close<(lowest[40][1]+15)))) then
stopv=1
else
stopv=0
endif
REM and  close<(close[80])
IF (time>=091000 and time<170000) and  close<(close[80]) then
feuvert=1
else
feuvert=0
endif
rem and (medianprice+1)=<bollingerup[17](close)
REM and close>(close[20])
if (time>=090000 and time<170000) and close>(close[30]) then
feurouge=1
else
feurouge=0
endif
if feuvert=1  and not onmarket and stopa=0 then
buy n share at market
endif
if feurouge=1   and not onmarket and stopv=0 then
sellshort n share at market
endif
set stop loss 38
set target profit 5
if time>160000 and time<170000 then
set target profit 6
endif

Download
Filename: SCALPING-CAC40-10-SECONDES.itf
Downloads: 734
WE ARE SOCIETY
WE ARE SOCIETY Senior
Developer by day, aspiring writer by night. Still compiling my bio... Error 404: presentation not found.
Author’s Profile

Comments

Popili
12 months ago
#

Salut Yann, Merci pour ton code. Je débute dans le trading et je tâtonne avec le trading algorithmique. J'ai été évidemment intrigué par ton code. J'ai lu les quelques commentaires, surtout à propos de la « sur-optimisation », à laquelle je ne saurais pas trop quoi répondre d'autre que ce que tu as sommairement dit. Encore bravo et merci. J'ai essayé de faire les quelques petites modifications que tu as mentionnées et j'ai aussi poussé le bot dans des situations extrêmes de toutes natures, il est robuste, très robuste, par contre j'ai relevé deux choses, la première, pour les données temporelles antérieures et le Walk Forward, j'ai préféré partir sur un 10/200/1, sur la première semaine de septembre, et le bot a nettement mieux gagné qu'avec les valeurs que tu avais données (≈50€ contre ≈740€). Je pense donc que ça reste plus avantageux de lui fournir des données plus précises. Et ce serait sûrement peut-être mieux d'étendre la plage et de lui donner un pas plus fin afin de pouvoir avoir une finesse plus importante. La deuxième est au sujet de la taille du capital et j'ai vu qu'il y avait d'autres commentaires au sujet des tailles de position. J'ai eu un soucis, je lui ai donné toujours plus d'argent à gérer et je suis allé jusqu'aux 150 000 de souvenir, mais là j'ai eu un retournement radical avec une perte énorme, je n'ai pas trop compris pourquoi. J'ai réessayé en le mettant à 100 000 et ça a été. Je vais regarder ça et je te tiendrai au courant. Si tu as une idée, fais m'en part. Je pense que c'est simplement lié à l'asymétrie des pertes, je ne vois pas d'autre raison. Si c'est bien ça, c'est un élément à surveiller. Il y-a-t-il une raison précise au 200 000 unitées de temps ? Je n'ai pas compris le choix (après je débute...) Pour ce qui est des interdictions horaires, il y-a-t-il des raisons autres que les ouvertures des bourses par exemple ? Je n'ai pas tout à fait compris. Merci encore :)

dammon
2 years ago
#

c'est un bien beau code que tu nous sors là. il m'a fallu du temps pour bien tout comprendre mais au final tout y est... (même un trop un mon gout) mais c'est top . Evidement à rafraichir en temps et en heure avec les variables. mais bravo.... je ne suis juste pas trop d'accord avec les ratios gains pertes mais bon ca ça dépend de chacun.

pdrh
2 years ago
#

Bonjour WE ARE SOCIETY,Vous optimisez toujours votre Algo chaque

WE ARE SOCIETY
2 years ago
#

Bonjour, je l'optimise et l'améliore chaque semaine en évitant au maximum les interdictions horaires et en les remplaçant plutôt par des if close>highest[40][1]-15 then stopachat=1 endif

InTrouble
2 years ago
#

Entendu, merci. Mais pas en tick, c'est bien çà?

InTrouble
2 years ago
#

Bonjour, je découvre que l'on peut faire des trades auto sur des timeframe de 10 secondes; Vous me confirmez ?

Nicolas
2 years ago
#

Oui on peut même jusqu'au 1 seconde.

David Daget
2 years ago
#

Bonjour. A noter que cette stratégie fonctionne aussi sur le ftse. Ce qui n'est pas surprenant puisque ce sont 2 indices avec une dynamique plutot similaire

WE ARE SOCIETY
2 years ago
#

DEFPARAM cumulateOrders = False rem CAC40 (france40) en 10 secondes rem à la ligne ci-dessous mettre le montant engagé capital=500 capital2=capital+STRATEGYPROFIT[0] taille=(capital2/(close*6/100)) if taille<1 then taille=1 endif n=taille rem les tendances timeframe(10 minute) if (supertrend[3,10]-6)=<close then haut10=1 endif if (supertrend[3,10]+3)>close then haut10=0 endif TIMEFRAME(3 minute) if (supertrend[3,3]-3)=<close then haut3=1 endif if (supertrend[3,3]+1)>close then haut3=0 endif timeframe (30 second) if (supertrend[3,6]-1)=<close then haut30s=1 endif if (supertrend[3,6]+7)>close then haut30s=0 endif timeframe (5 minute) if (supertrend[3,10]-3)=<close then haut5m=1 endif if (supertrend[3,10]+3)>close then haut5m=0 endif timeframe (10 second) rem les horaires interdits à l'achat if (time>095000 and time<110000) or (dayofweek=2 and ((time>110000 and time<144000)or time>165000)) or (dayofweek=3 and ((time>121500 and time<133000) or haut3=0)) or (time>160000 and time<161500) or (dayofweek=4 and ((haut10=0 or haut3=0) or (time>093000 and time<100000))) or (dayofweek=1 and (haut3=0 or close>(highest[40][1]-10))) or (dayofweek=4 and (close>(highest[80][1]-15))) or (dayofweek=5 and close>(highest[60][1]-10)) or (dayofweek=4 and time>153000 and time<170000) or (dayofweek=5 and time<110000) or (haut10=0 and close>(highest[40][1]-15)) or (dayofweek=5 and (haut30s=0 or haut3=0) and time<120000)or (dayofweek=1 and ((haut10=0) or close>(highest[40][1]-15))) or (dayofweek=3 and time>143000 and haut30s=0) or ((dayofweek=4 or dayofweek=1) and haut5m=0) or (dayofweek=5 and haut30s=0 and time>140000 and time<153500) or (dayofweek=2 and ((time>152900 and time<154500)or time<100000)) or (dayofweek=3 and time>091500 and time<113500) or (time>=161500 and time<163000) or (dayofweek=5 and haut30s=0) then stopa=1 else stopa=0 endif rem les horaires interdits à la vente if (time>=100000 and time<104500) or (time>130500 and time<140000) or (dayofweek=5 and (time>090000 and time<121000)) or (dayofweek=4 and close<(lowest[45][1]+12)) or (dayofweek=2 and (haut3=1 or haut30s=1)) or (dayofweek=4 and haut3=1) or ((dayofweek=5 or dayofweek=3) and (close<(lowest[150][1]+19) or (close<(lowest[60][1]+25)))) or (time>162500 and time<170000) or (dayofweek=1 and (close<(lowest[40][1]+10) or (time>=091000 and time<104500))) or (time>093000 and time<100000) or (dayofweek=2 and time>120000 and time<130000) or (dayofweek=4 and ((time>111500 and time<130000) or (time>144500 and time<150000))) or (dayofweek=1 and haut3=1) or ((dayofweek=4 or dayofweek=5) and ((close<(lowest[150][1]+21)) or (time>151000 and time<153000))) or (dayofweek=4 and time<091000 or (time>092000 and time<100000)) or (dayofweek=4 and (close<(lowest[50][1]+15))) or (dayofweek=2 and ((time>110000 and time<111500) or (time>142500 and time<150000))) or (dayofweek=1 and time>133000 and time<143000) or (dayofweek=2 and time>153000 and time<163000) or (close<lowest[90][1]+10) or (dayofweek=2 and time>150000 and time<153000) or (dayofweek=1 and ((haut10=1) or (time>120000 and time<130000 and close<(lowest[40][1]+15)))) or (dayofweek=2 and time<130000) or (dayofweek=1 and time>100000) then stopv=1 else stopv=0 endif rem les horaires autorisés avec les niveaux décidants si achat ou vente IF (time>=091000 and time<170000) and close<(close[90]) then feuvert=1 else feuvert=0 endif if (time>=090000 and time<170000) and close>(close[40]) then feurouge=1 else feurouge=0 endif rem les ordres if feuvert=1 and not onmarket and stopa=0 then buy n share at market endif if feurouge=1 and not onmarket and stopv=0 then sellshort n share at market endif set stop loss 38 set target profit 5 if time>160000 and time<170000 then set target profit 6 endif

sfl
sfl
2 years ago
#

Removing the short side will help, I would like to know from the author where are the condition coming from, are they a "standard" BIAS on CAC40 ? I am talking about these line of code: if (time>100000 and time<110000) or (time>123500 and time<133000) or (dayofweek=2 and ((time>110000 and time<144000)or time>165000)) or (dayofweek=3 and ((time>121500 and time<131500) or haut3=0)) or (time>160000 and time<161500) or (dayofweek=1 and time<100000) or (dayofweek=4 and ((haut10=0 or haut3=0) or (time>093000 and time<100000))) or (dayofweek=1 and (haut3=0 or close>(highest[40][1]-10))) or (dayofweek=2 and haut3=0 and time<110000) or (dayofweek=4 and (close>(highest[60][1]-10))) or (dayofweek=5 and close>(highest[60][1]-10)) or (dayofweek=4 and time>153000 and time<170000) or (dayofweek=5 and time<110000) or (haut10=0 and close>(highest[40][1]-15)) or (dayofweek=5 and (haut30s=0 or haut3=0) and time<120000)or (dayofweek=1 and ((haut10=0) or close>(highest[40][1]-15))) or (dayofweek=3 and time>143000 and haut30s=0) or ((dayofweek=4 or dayofweek=1) and haut5m=0) or ((dayofweek=4) and (close>(highest[50][1]-15)) and time<153000) or (dayofweek=5 and time>152900 and time<154000) or (dayofweek=5 and haut30s=0 and time>140000 and time<153500) or ((dayofweek=2 or dayofweek=3) and (time>150000 and time<153500)) or (dayofweek=2 and time>152900 and time<154500)or (dayofweek=3 and time>110000 and time<113500) or (time>=161500 and time<163000) or (dayofweek=5 and haut30s=0) then stopa=1 else stopa=0 endif

sfl
sfl
2 years ago
#

winnie37, as you can see from my screenshots seems like the strategy has been optimized on the 200k backtest, then running on the cash 1euro makes no sense since avgtrade is too small to generate profits, you need CAC cash 10euro to get avgtrade around 20euro per trade, it looks good but who knows, too fews data for backtesting in my opinion, we should have at least 5-8years of data at 10seconds to validate this strategy. Then, I am very doubful about these lines of code: if (time>=100000 and time<103000) or (time>130500 and time<140000) or (dayofweek=5 and (time>103000 and time<121000)) or (dayofweek=4 and close<(lowest[45][1]+12)) or (dayofweek=2 and (haut3=1 or haut30s=1)) or (dayofweek=4 and haut3=1) or ((dayofweek=5 or dayofweek=3) and (close<(lowest[150][1]+19) or (close<(lowest[60][1]+25)))) or (time>162500 and time<170000) or (dayofweek=1 and (close<(lowest[40][1]+10) or (time>=091000 and time<104500))) or (time>093000 and time<100000) or (dayofweek=2 and time>120000 and time<130000) or (dayofweek=4 and ((time>111500 and time<130000) or (time>144500 and time<150000))) or (dayofweek=1 and haut3=1) or ((dayofweek=4 or dayofweek=5) and ((close<(lowest[150][1]+21)) or (time>151000 and time<153000))) or (dayofweek=4 and time<091000) or (dayofweek=4 and (close<(lowest[50][1]+15))) or (dayofweek=2 and ((time>110000 and time<111500) or (time>142500 and time<150000))) or (dayofweek=1 and time>133000 and time<143000) or (dayofweek=2 and time>161000 and time<163000) or (close<lowest[90][1]+10) or (dayofweek=2 and time>150000 and time<153000) or (dayofweek=1 and ((haut10=1) or (time>120000 and time<130000 and close<(lowest[40][1]+15)))) then stopv=1 else stopv=0 endif I apologize but this code looks like overfitting to me.

sfl
sfl
2 years ago
#

Here: https://imgur.com/a/07T1HGF set stop loss 38 set target profit 10 2 point spread ( CASH France 1euro )

winnie37
2 years ago
#

could you post the backtest please ?

sfl
sfl
2 years ago
#

This is dangerous, did you see aug 2023 ? I would not run live this algo, need more daata to test, tested with 1M from jul 23 to march, not enugh data in my opinion to be sure there is an edge. Tf so small always suffers a lot of noise. OOS equity dosent look good at all. tested with sp 10 and sl 38 which is the best configuration In Sample until January, from jan to March performance is not consistent.

winnie37
2 years ago
#

bonjour, une petite idée d'ajout mais que je ne saurai coder, ajouter au stop loss un break even qui déclenche un stop suiveur pour profiter de la tendance si elle se poursuit...

KumoNoJuzza
3 years ago
#

Bonjour. Je le teste depuis lundi. Je suis à 37 points de gain sur la semaine soit 37 € à 1€ du point sur le CAC40 / PXI. Avec respectivement des périodes de 90 et de 35 pour les périodes à optimiser. Quelqu'un a fait mieux ? Je n'arrive pas encore à reproduire la super perf du backtest ci-joint. Merci à @wearesociety, tu me donnes du grain à moudre pour ce soir :)

WE ARE SOCIETY
3 years ago
#

Bonjour KumoNoJuzza, en réalité ça dépend aussi de la volatilité, chaque période est différente. Si tu veux qu'il soit + actif, tu dois retirer des plages horaires d'interdiction en les remplaçant par quelque chose de + intelligent comme par exemple if close>highest[30][1]-15 par exemple

WE ARE SOCIETY
3 years ago
#

WE ARE SOCIETY
3 years ago
#

Bonjour, je ne pratique pas le DJ et donc il me faudrait bcp trop de temps pour faire un algo dessus et en + avec peu de chances d'y parvenir. Pour l'algo "jouer au ping pong avec medianprice", l'administrateur ne l' a pas valider et donc il n' apparait pas.

josef1604
3 years ago
#

JOUER AU PING-PONG AVEC MEDIANPRICE CAC40 EN 10 LIGNES DE CODE SEULEMENT Une question, pourquoi ce bot n'est-il pas visible dans prorealcode ? Je pense que ça devrait être intéressant. Comment pouvez-vous nous contacter en privé ? grâce du nouveau

josef1604
3 years ago
#

Bonjour, merci beaucoup d'avoir répondu. Tu as raison pour le DJ, mais c'est aussi celui qui peut donner le plus d'argent, même s'il est le plus dangereux. Mais pourriez-vous me faire la faveur de me mettre dans le même bot pendant les heures de marché aux États-Unis, s'il vous plaît ?

josef1604
3 years ago
#

Bonjour, comment puis-je passer au graphique du Dow Jones ? J'ai essayé et cela a été impossible @NOUS SOMMES LA SOCIÉTÉ

WE ARE SOCIETY
3 years ago
#

Bonjour , hélas je ne pratique pas le Dow Jones car c'est un étalon sauvage par rapport au petit mouton suiveur du CAC40, les fluctuations du DJ sont tellement importantes qu'il faut soit avoir énormément d'argent et du temps, soit couper court rapidement quand on n'est pas dans la tendance, c'est compliqué. Le DAX est moins dangereux et aussi intéressant pour un trading manuel car il fait du bruit : des fluctuations constantes qui permettent de faire beaucoup d'aller retour en intraday

Patrice210
3 years ago
#

Bonjour, la stratégie ne fonctionne pas à 1M même en changeant les variables 1 fois par semaine. Dommage

Gerf11
3 years ago
#

Bonjour, pas de pertes de mn côté sur les 15 derniers jours. Mon sous jacent les les futur Cac40. Je viens de passer sur FCE FULL0124. En 10 secondes. J'a toutefois tendance à me dire que les derniers gains furent vraiment chanceux car passé overnight et assez prche du stop qui mange 7 performances de gains...Je me demande si cela ne serait pas intéressant de calculer si pas de stop win dans les 2h après achat, de clôturer la postiion...As-tu déjà tenté "@We Are SOCIETY"? Pour le reste je fais l'optimisation des variables le dimanche, uniquement deux variables (lignes 82 et 89 dans ton code ci-dessus). En fais-tu davantage?

Gerf11
3 years ago
#

intéressant...merci pour ton opinion. En tout cas, testé en réel et à toujours fonctionné...je constate simplement que dans ce code, les sorties en gains se sont faites au max dans les deux heures, après c'est davantage de la chance... je vais tester pour paramétrer de la sorte car actuellement les différents ratios sont excellents. Bravo à toi!

WE ARE SOCIETY
3 years ago
#

Bonjour Gerf11, il est possible de mettre un stop loss + loin et d'améliorer ce code afin qu'il intervienne + souvent en supprimant des interdictions horaires et en les remplaçant par du code + intelligent. Pour ma part, je n'utilise plus ce code depuis un bon moment car chaque week-end, j'aime inventer des codes différents et essayer de faire mieux. Les banques ont souvent plusieurs algos lancés en simultanés et ensuite ils font des arbitrages. Si tu testes ce code sur une longue période 1M (8 mois environ) sur la version complète de proorder, il ne donne pas de bons résultats. Après moi je ne veux pas d'un algo qui soit bon toute l'année, je préfère un dynamique qui intervient souvent. La problématique est toujours la même, faire un algo qui suit la tendance et qui intervient dans un canal (+haut et +bas) bien déterminé.

David Daget
3 years ago
#

Bonjour ! As tu reussi a éviter les pertes du 13, 14 et 19 decembre ? Je suis assez curieux ^^

WE ARE SOCIETY
3 years ago
#

Salut David, ben moi je regarde les cours graphiques au moment où il est intervenu et j'essaie d'analyser comment lui dire de ne pas le faire, parfois je ne trouve pas d'autres solutions que d'interdire cette plage horaire mais c'est une solution que je n'aime pas car ça diminue son temps d'intervention, donc son gain potentiel, parfois je trouve une solution intelligente pour lui faire comprendre qu'il a acheté trop cher pour un matin ou qu'il s'est positionné trop bas a la vente pour l'après -midi. Par exemple en fin d'année, il y a un rallye a la hausse et il est dangereux de se positionner a la baisse, particulièrement après 13h30.

ProRealCode ProRealCode
Loading...