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!
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) 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