eur/usd position à la vente
Forums › ProRealTime forum Français › Support ProOrder › eur/usd position à la vente
- This topic has 50 replies, 7 voices, and was last updated 2 months ago by Meta Signals Pro.
-
-
01/07/2023 at 9:10 AM #206959
voici le second avec c3
nasdaq 5 min avec c3123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142// Définition des paramètres du codeDEFPARAM CumulateOrders = false // pas de cumul de positionsDEFPARAM Preloadbars = 1000000capital= 50000// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position avant l'heure spécifiéenoEntryBeforeTime = 150000timeEnterBefore = time >= noEntryBeforeTime// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position après l'heure spécifiéenoEntryAfterTime = 223000timeEnterAfter = time < noEntryAfterTime// Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiésdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Conditions pour ouvrir une position acheteuseindicator1 = SenkouSpanA[9,26,52]c1 = (close CROSSES OVER indicator1)indicator2 = SenkouSpanB[9,26,52]c2 = (close CROSSES OVER indicator2)c3 = (close > DOpen(0)[1])IF (c1 AND c2 and c3) AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THENBUY 2 CONTRACT AT MARKETpartial=0ENDIF// sortie partielleif longonmarket and positionperf>1.7/100 and partial=0 thensell countofposition/9.7 contract at marketpartial = 1endifif summation[1800](longonmarket)=1800 thensell at marketendifif summation[1000](shortonmarket)=1000 thenexitshort at marketendif// Stops et objectifsset stop %loss 1.8set target %profit 1.73IF Not OnMarket THEN//// when NOT OnMarket reset values to default values//TrailStart = 65 //30 Start trailing profits from this pointBasePerCent = 0.000 //20.0% Profit percentage to keep when setting BerakEvenStepSize = 1 //10 Pip chunks to increase PercentagePerCentInc = 0.000 //10.0% PerCent increment after each StepSize chunkBarNumber = 10 //10 Add further % so that trades don't keep running too longBarPerCent = 0.235 //10% Add this additional percentage every BarNumber barsRoundTO = -0.5 //-0.5 rounds always to Lower integer, +0.4 rounds always to Higher integer, 0 defaults PRT behaviourPriceDistance = 9 * pipsize //7 minimun distance from current pricey1 = 0 //reset to 0y2 = 0 //reset to 0ProfitPerCent = BasePerCent //reset to desired default valueTradeBar = BarIndexELSIF LongOnMarket AND close > (TradePrice + (y1 * pipsize)) THEN //LONG positions//// compute the value of the Percentage of profits, if any, to lock in for LONG trades//x1 = (close - tradeprice) / pipsize //convert price to pipsIF x1 >= TrailStart THEN // go ahead only if N+ pipsDiff1 = abs(TrailStart - x1) //difference from current profit and TrailStartChunks1 = max(0,round((Diff1 / StepSize) + RoundTO)) //number of STEPSIZE chunksProfitPerCent = BasePerCent + (BasePerCent * (Chunks1 * PerCentInc)) //compute new size of ProfitPerCent// compute number of bars elapsed and add an additionl percentage// (this percentage is different from PerCentInc, since it's a direct percentage, not a Percentage of BasePerCent)// (if BasePerCent is 20% and this is 10%, the whole percentage will be 30%, not 22%)BarCount = BarIndex - TradeBarIF BarCount MOD BarNumber = 0 THENProfitPerCent = ProfitPerCent + BarPerCentENDIF//ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent)) //make sure ProfitPerCent doess not exceed 100%y1 = max(x1 * ProfitPerCent, y1) //y1 = % of max profitENDIFELSIF ShortOnMarket AND close < (TradePrice - (y2 * pipsize)) THEN //SHORT positions//// compute the value of the Percentage of profits, if any, to lock in for SHORT trades//x2 = (tradeprice - close) / pipsize //convert price to pipsIF x2 >= TrailStart THEN // go ahead only if N+ pipsDiff2 = abs(TrailStart - x2) //difference from current profit and TrailStartChunks2 = max(0,round((Diff2 / StepSize) + RoundTO)) //number of STEPSIZE chunksProfitPerCent = BasePerCent + (BasePerCent * (Chunks2 * PerCentInc)) //compute new size of ProfitPerCent// compute number of bars elapsed and add an additionl percentage// (this percentage is different from PerCentInc, since it's a direct percentage, not a Percentage of BasePerCent)// (if BasePerCent is 20% and this is 10%, the whole percentage will be 30%, not 22%)BarCount = BarIndex - TradeBarIF BarCount MOD BarNumber = 0 THENProfitPerCent = ProfitPerCent + BarPerCentENDIF//ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent)) //make sure ProfitPerCent doess not exceed 100%y2 = max(x2 * ProfitPerCent, y2) //y2 = % of max profitENDIFENDIFIF y1 THEN //Place pending STOP order when y1 > 0 (LONG positions)SellPrice = Tradeprice + (y1 * pipsize) //convert pips to price//// check the minimun distance between ExitPrice and current price//IF abs(close - SellPrice) > PriceDistance THEN//// place either a LIMIT or STOP pending order according to current price positioning//IF close >= SellPrice THENSELL AT SellPrice STOPELSESELL AT SellPrice LIMITENDIFELSE////sell AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price//SELL AT MarketENDIFENDIFIF y2 THEN //Place pending STOP order when y2 > 0 (SHORT positions)ExitPrice = Tradeprice - (y2 * pipsize) //convert pips to price//// check the minimun distance between ExitPrice and current price//IF abs(close - ExitPrice) > PriceDistance THEN//// place either a LIMIT or STOP pending order according to current price positioning//IF close <= ExitPrice THENEXITSHORT AT ExitPrice STOPELSEEXITSHORT AT ExitPrice LIMITENDIFELSE////ExitShort AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price//EXITSHORT AT MarketENDIF01/07/2023 at 9:16 AM #206963et fifi743 voici un autre avec d’autres paramètre modifié notamment trailstar , le take profit
nasdaq 5 min123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167// Définition des paramètres du codeDEFPARAM CumulateOrders = false // pas de cumul de positionsDEFPARAM Preloadbars = 200000capital= 50000// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position avant l'heure spécifiéenoEntryBeforeTime = 150000timeEnterBefore = time >= noEntryBeforeTime// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position après l'heure spécifiéenoEntryAfterTime = 223000timeEnterAfter = time < noEntryAfterTime// Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiésdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Conditions pour ouvrir une position acheteuseindicator1 = SenkouSpanA[9,26,52]c1 = (close CROSSES OVER indicator1)indicator2 = SenkouSpanB[9,26,52]c2 = (close CROSSES OVER indicator2)c3 = (close > DOpen(0)[1])IF (c1 AND c2 )AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry and tally < maxTrades THENBUY 2 CONTRACT AT MARKETpartiel=0ENDIF// sortie partielleif longonmarket and positionperf>0.42/100 and partial=0 thensell countofposition/9.1 contract at marketpartial = 1endif//---------------------------------------------------------------------------------------------------------------once maxTrades = 5 //maxNumberDailyTradesonce tally = 0if intradayBarIndex = 0 thentally = 0endifnewTrades = (onMarket and not onMarket[1]) or ((not onMarket and not onMarket[1]) and (strategyProfit <> strategyProfit[1])) or (longOnMarket and ShortOnMarket[1]) or (longOnMarket[1] and shortOnMarket) or ((tradeIndex(1) = tradeIndex(2)) and (barIndex = tradeIndex(1)) and (barIndex > 0) and (strategyProfit = strategyProfit[1]))if newTrades thentally = tally +1endif//--------------------------------------------------------------//---------------------------------------------------------------------------------------------------------------//Max-Orders per Dayonce maxOrdersL = 1 //longonce maxOrdersS = 1 //shortif intradayBarIndex = 0 then //reset orders countordersCountL = 0ordersCountS = 0endifif longTriggered then //check if an order has opened in the current barordersCountL = ordersCountL + 1endifif shortTriggered then //check if an order has opened in the current barordersCountS = ordersCountS + 1endif//--------------------------------------------------------------// Stops et objectifsset stop %loss 1.40set target %profit 0.668IF Not OnMarket THEN//// when NOT OnMarket reset values to default values//TrailStart = 5.2 //30 Start trailing profits from this pointBasePerCent = 0.000 //20.0% Profit percentage to keep when setting BerakEvenStepSize = 1 //10 Pip chunks to increase PercentagePerCentInc = 0.000 //10.0% PerCent increment after each StepSize chunkBarNumber = 1 //10 Add further % so that trades don't keep running too longBarPerCent = 0.235 //10% Add this additional percentage every BarNumber barsRoundTO = -0.5 //-0.5 rounds always to Lower integer, +0.4 rounds always to Higher integer, 0 defaults PRT behaviourPriceDistance = 9 * pipsize //7 minimun distance from current pricey1 = 0 //reset to 0y2 = 0 //reset to 0ProfitPerCent = BasePerCent //reset to desired default valueTradeBar = BarIndexELSIF LongOnMarket AND close > (TradePrice + (y1 * pipsize)) THEN //LONG positions//// compute the value of the Percentage of profits, if any, to lock in for LONG trades//x1 = (close - tradeprice) / pipsize //convert price to pipsIF x1 >= TrailStart THEN // go ahead only if N+ pipsDiff1 = abs(TrailStart - x1) //difference from current profit and TrailStartChunks1 = max(0,round((Diff1 / StepSize) + RoundTO)) //number of STEPSIZE chunksProfitPerCent = BasePerCent + (BasePerCent * (Chunks1 * PerCentInc)) //compute new size of ProfitPerCent// compute number of bars elapsed and add an additionl percentage// (this percentage is different from PerCentInc, since it's a direct percentage, not a Percentage of BasePerCent)// (if BasePerCent is 20% and this is 10%, the whole percentage will be 30%, not 22%)BarCount = BarIndex - TradeBarIF BarCount MOD BarNumber = 0 THENProfitPerCent = ProfitPerCent + BarPerCentENDIF//ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent)) //make sure ProfitPerCent doess not exceed 100%y1 = max(x1 * ProfitPerCent, y1) //y1 = % of max profitENDIFELSIF ShortOnMarket AND close < (TradePrice - (y2 * pipsize)) THEN //SHORT positions//// compute the value of the Percentage of profits, if any, to lock in for SHORT trades//x2 = (tradeprice - close) / pipsize //convert price to pipsIF x2 >= TrailStart THEN // go ahead only if N+ pipsDiff2 = abs(TrailStart - x2) //difference from current profit and TrailStartChunks2 = max(0,round((Diff2 / StepSize) + RoundTO)) //number of STEPSIZE chunksProfitPerCent = BasePerCent + (BasePerCent * (Chunks2 * PerCentInc)) //compute new size of ProfitPerCent// compute number of bars elapsed and add an additionl percentage// (this percentage is different from PerCentInc, since it's a direct percentage, not a Percentage of BasePerCent)// (if BasePerCent is 20% and this is 10%, the whole percentage will be 30%, not 22%)BarCount = BarIndex - TradeBarIF BarCount MOD BarNumber = 0 THENProfitPerCent = ProfitPerCent + BarPerCentENDIF//ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent)) //make sure ProfitPerCent doess not exceed 100%y2 = max(x2 * ProfitPerCent, y2) //y2 = % of max profitENDIFENDIFIF y1 THEN //Place pending STOP order when y1 > 0 (LONG positions)SellPrice = Tradeprice + (y1 * pipsize) //convert pips to price//// check the minimun distance between ExitPrice and current price//IF abs(close - SellPrice) > PriceDistance THEN//// place either a LIMIT or STOP pending order according to current price positioning//IF close >= SellPrice THENSELL AT SellPrice STOPELSESELL AT SellPrice LIMITENDIFELSE////sell AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price//SELL AT MarketENDIFENDIFIF y2 THEN //Place pending STOP order when y2 > 0 (SHORT positions)ExitPrice = Tradeprice - (y2 * pipsize) //convert pips to price//// check the minimun distance between ExitPrice and current price//IF abs(close - ExitPrice) > PriceDistance THEN//// place either a LIMIT or STOP pending order according to current price positioning//IF close <= ExitPrice THENEXITSHORT AT ExitPrice STOPELSEEXITSHORT AT ExitPrice LIMITENDIFELSE////ExitShort AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price//EXITSHORT AT MarketENDIFENDIF01/07/2023 at 9:19 AM #206967au passage si tu peux partager les tiens et autres avec des performances sur unité de temps plus courtes aussi. Mais celui en 15 et 30 minutes tu peux partager?
01/07/2023 at 9:20 AM #206968les algos sont avec le spread a 1 je précise
01/07/2023 at 9:41 AM #206969Pour eur/usd pour info j’ai réglé take profit à 0.20 et trailstart à 3.0 apres si tu augmentes des pertes apparaissent. exemple 0.22
01/08/2023 at 11:19 AM #207023bonjour nasdaq en 5 mnutes posté
01/08/2023 at 11:30 AM #207025eur/usd time 3 .
avec modification de fiffi743.
eur/usd 3 mnutes123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168// Définition des paramètres du codeDEFPARAM CumulateOrders = FalseDEFPARAM PRELOADBARS = 2000// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position avant l'heure spécifiéenoEntryBeforeTime = 090000timeEnterBefore = time >= noEntryBeforeTime// Empêche le système de placer des ordres pour entrer sur le marché ou augmenter la taille d'une position après l'heure spécifiéenoEntryAfterTime = 110000timeEnterAfter = time < noEntryAfterTime// Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiésdaysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0// Conditions pour ouvrir une position en vente à découvert// Conditions pour ouvrir une position en vente à découvertindicator1 = SenkouSpanB[9,26,52]indicator2 = SenkouSpanA[9,26,52]c1 = (close CROSSES UNDER indicator1)c2 = (close CROSSES UNDER indicator2)indicator3 = Average[400](close)c3 = (close > indicator3)IF (c1 AND c2 and (c3 or (high[3]<high[1]and low[3]<low[1] )))AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry and tally < maxTrades THENsellshort 1 CONTRACT AT MArketpartial=0endif// sortie partielleif shortonmarket and positionperf>0.10/100 and partial=0 thenexitshort 0.05 contract at marketpartial = 1endifonce maxTrades = 10 //maxNumberDailyTradesonce tally = 0if intradayBarIndex = 0 thentally = 0endifnewTrades = (onMarket and not onMarket[1]) or ((not onMarket and not onMarket[1]) and (strategyProfit <> strategyProfit[1])) or (longOnMarket and ShortOnMarket[1]) or (longOnMarket[1] and shortOnMarket) or ((tradeIndex(1) = tradeIndex(2)) and (barIndex = tradeIndex(1)) and (barIndex > 0) and (strategyProfit = strategyProfit[1]))if newTrades thentally = tally +1endif//------------------------------------------------------------------------------------------------------------------------//---------------------------------------------------------------------------------------------------------------//Max-Orders per Dayonce maxOrdersL = 1 //longonce maxOrdersS = 1 //shortif intradayBarIndex = 0 then //reset orders countordersCountL = 0ordersCountS = 0endifif longTriggered then //check if an order has opened in the current barordersCountL = ordersCountL + 1endifif shortTriggered then //check if an order has opened in the current barordersCountS = ordersCountS + 1endif//------------------------------------------------------------------------------------------------------------------------// Stops et objectifsset stop %loss 0.58set target %profit 0.20IF Not OnMarket THEN//// when NOT OnMarket reset values to default values//TrailStart = 3.0 //30 Start trailing profits from this 1.74BasePerCent = 0.000 //20.0% Profit percentage to keep when setting BerakEvenStepSize = 1 //10 Pip chunks to increase PercentagePerCentInc = 0.000 //10.0% PerCent increment after each StepSize chunkBarNumber = 10 //10 Add further % so that trades don't keep running too longBarPerCent = 0.235 //10% Add this additional percentage every BarNumber barsRoundTO = -0.5 //-0.5 rounds always to Lower integer, +0.4 rounds always to Higher integer, 0 defaults PRT behaviourPriceDistance = 9 * pipsize //7 minimun distance from current pricey1 = 0 //reset to 0y2 = 0 //reset to 0ProfitPerCent = BasePerCent //reset to desired default valueTradeBar = BarIndexELSIF LongOnMarket AND close > (TradePrice + (y1 * pipsize)) THEN //LONG positions//// compute the value of the Percentage of profits, if any, to lock in for LONG trades//x1 = (close - tradeprice) / pipsize //convert price to pipsIF x1 >= TrailStart THEN // go ahead only if N+ pipsDiff1 = abs(TrailStart - x1) //difference from current profit and TrailStartChunks1 = max(0,round((Diff1 / StepSize) + RoundTO)) //number of STEPSIZE chunksProfitPerCent = BasePerCent + (BasePerCent * (Chunks1 * PerCentInc)) //compute new size of ProfitPerCent// compute number of bars elapsed and add an additionl percentage// (this percentage is different from PerCentInc, since it's a direct percentage, not a Percentage of BasePerCent)// (if BasePerCent is 20% and this is 10%, the whole percentage will be 30%, not 22%)BarCount = BarIndex - TradeBarIF BarCount MOD BarNumber = 0 THENProfitPerCent = ProfitPerCent + BarPerCentENDIF//ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent)) //make sure ProfitPerCent doess not exceed 100%y1 = max(x1 * ProfitPerCent, y1) //y1 = % of max profitENDIFELSIF ShortOnMarket AND close < (TradePrice - (y2 * pipsize)) THEN //SHORT positions//// compute the value of the Percentage of profits, if any, to lock in for SHORT trades//x2 = (tradeprice - close) / pipsize //convert price to pipsIF x2 >= TrailStart THEN // go ahead only if N+ pipsDiff2 = abs(TrailStart - x2) //difference from current profit and TrailStartChunks2 = max(0,round((Diff2 / StepSize) + RoundTO)) //number of STEPSIZE chunksProfitPerCent = BasePerCent + (BasePerCent * (Chunks2 * PerCentInc)) //compute new size of ProfitPerCent// compute number of bars elapsed and add an additionl percentage// (this percentage is different from PerCentInc, since it's a direct percentage, not a Percentage of BasePerCent)// (if BasePerCent is 20% and this is 10%, the whole percentage will be 30%, not 22%)BarCount = BarIndex - TradeBarIF BarCount MOD BarNumber = 0 THENProfitPerCent = ProfitPerCent + BarPerCentENDIF//ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent)) //make sure ProfitPerCent doess not exceed 100%y2 = max(x2 * ProfitPerCent, y2) //y2 = % of max profitENDIFENDIFIF y1 THEN //Place pending STOP order when y1 > 0 (LONG positions)SellPrice = Tradeprice + (y1 * pipsize) //convert pips to price//// check the minimun distance between ExitPrice and current price//IF abs(close - SellPrice) > PriceDistance THEN//// place either a LIMIT or STOP pending order according to current price positioning//IF close >= SellPrice THENSELL AT SellPrice STOPELSESELL AT SellPrice LIMITENDIFELSE////sell AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price//SELL AT MarketENDIFENDIFIF y2 THEN //Place pending STOP order when y2 > 0 (SHORT positions)ExitPrice = Tradeprice - (y2 * pipsize) //convert pips to price//// check the minimun distance between ExitPrice and current price//IF abs(close - ExitPrice) > PriceDistance THEN//// place either a LIMIT or STOP pending order according to current price positioning//IF close <= ExitPrice THENEXITSHORT AT ExitPrice STOPELSEEXITSHORT AT ExitPrice LIMITENDIFELSE////ExitShort AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price//EXITSHORT AT MarketENDIFENDIF01/08/2023 at 11:31 AM #207030Qui pourrait le faire dans le sens de l’achat?
01/08/2023 at 12:15 PM #207036Wonderful.
Enclosed the backtest 1Mio units
Enclosed the itf-file with which was tested
tested was the first code which was published, quasi without mods1 user thanked author for this post.
01/08/2023 at 12:18 PM #207042Ci-joint le fichier itf avec lequel le code a été testé joint le tableau de bord 1 Mio unités
2 users thanked author for this post.
01/14/2023 at 5:32 AM #207415Salut fiffi,
je te dérange 2 minutes , je suis intéressé par tes algo si tu veux bien partager et si tu as fait attention j’ai partagé quelques algo peux tu travailler dessus afin d’améliorer ?
Dans l’attente de te lire.
01/15/2023 at 9:59 AM #20746001/24/2023 at 7:17 AM #208032Bonjour fifi743 ,
J’ai un algo a tester , voila la stratégie serait quand l’algo eur/usd se met en route je voudrais pouvoir en faire un autre qui puisse démarrer avec les parametres de fibonacci c’est a dire quand leurusd ouvre une position et qu’on prend le dernier plus haut en timeframe 1h ou 4h ou 15 min par exemple et que le cours retrace les 50 ou 60% par rapport a fibonacci , je voudrais qu’il ouvre une position à la vente et que le take profit soit calquer sur celui de l’eurusd et le stop égalment.01/25/2023 at 6:44 AM #208160Bonjour JohnScher,
je viens vers toi pour une élaborer une technique que je voudrais paramétrer.Je voudrais en prenant l’algo eur/usd 3 minutes insérer ou faire un autre algo en parallèle à celui la qui utilise fibonacci.
Je voudrais que l’algo démarre quand il retrace par exemple les 50% dans l’unité de temps soit 5ou 15 ou 1h par rapport au trade prix par l’algo eur/usd.
Dans l’attente de te lire02/18/2023 at 6:28 PM #209920BONJOUR
j’ai remarqué que les pertes se font en tendance haussière … et à l’inverse , les profits se font dans la tendance contraire.
A bon entendeurs salut!
1 user thanked author for this post.
-
AuthorPosts
Find exclusive trading pro-tools on