scalping rsi nasdaq 30 sec

Viewing 15 posts - 1 through 15 (of 20 total)
  • Author
    Posts
  • #193458 quote
    Marlaynicolas
    Participant
    New

    Bonjour roberto et toute la communauté

    je vous partage une stratégie sur du 30 sec nasdaq 15h30/17h30  je voudrais pouvoir diminuer la perte j’ai essayé d’intégrer votre break even pour limiter la perte mais cela reste moyen je trouve.

    Pouvez vous apporter votre savoir sur cette algo je vous remercie.

    Je m’aperçois que les deux premiers trades sont toujours gagnants mais un mauvais  vient gâcher la fête.

    Sur le backtest depuis mi mars que je le suis les semaines sont toujours positves mais ca pourrait être mieux. Quand pensez vous?

    Merci pour votre aide

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    // Annule tous les ordres en attente et ferme toutes les positions à l'heure "FLATAFTER"
    DEFPARAM FLATAFTER = 173000
    
    // 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ée
    noEntryBeforeTime = 153000
    timeEnterBefore = 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ée
    noEntryAfterTime = 173000
    timeEnterAfter = time < noEntryAfterTime
    
    // Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiés
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions pour ouvrir une position acheteuse
    indicator1 = RSI[14](close)
    c1 = (indicator1 CROSSES OVER 30)
    
    IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    
    // Conditions pour ouvrir une position en vente à découvert
    indicator2 = RSI[14](close)
    c2 = (indicator2 CROSSES UNDER 70)
    
    IF c2 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    
    // Stops et objectifs
    SET STOP pTRAILING 31
    SET TARGET pPROFIT 11
    IF Not OnMarket THEN
    //
    // when NOT OnMarket reset values to default values
    //
    TrailStart    = 5          //30     Start trailing profits from this point
    BasePerCent   = 0.000       //20.0%  Profit percentage to keep when setting BerakEven
    StepSize      = 10          //10     Pip chunks to increase Percentage
    PerCentInc    = 0.100       //10.0%  PerCent increment after each StepSize chunk
    BarNumber     = 10          //10     Add further % so that trades don't keep running too long
    BarPerCent    = 0.100       //10%    Add this additional percentage every BarNumber bars
    RoundTO       = -0.5        //-0.5   rounds always to Lower integer,   +0.4 rounds always to Higher integer,     0 defaults PRT behaviour
    PriceDistance = 7 * pipsize //7      minimun distance from current price
    y1            = 0           //reset to 0
    y2            = 0           //reset to 0
    ProfitPerCent = BasePerCent //reset to desired default value
    TradeBar      = BarIndex
    ELSIF 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 pips
    IF x1 >= TrailStart THEN                                                //    go ahead only if N+ pips
    Diff1         = abs(TrailStart - x1)                                 //difference from current profit and TrailStart
    Chunks1       = max(0,round((Diff1 / StepSize) + RoundTO))           //number of STEPSIZE chunks
    ProfitPerCent = 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 - TradeBar
    IF BarCount MOD BarNumber = 0 THEN
    ProfitPerCent = ProfitPerCent + BarPerCent
    ENDIF
    //
    ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent))         //make sure ProfitPerCent doess not exceed 100%
    y1 = max(x1 * ProfitPerCent, y1)                                     //y1 = % of max profit
    ENDIF
    ELSIF 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 pips
    IF x2 >= TrailStart THEN                                                //      go ahead only if N+ pips
    Diff2         = abs(TrailStart - x2)                                 //difference from current profit and TrailStart
    Chunks2       = max(0,round((Diff2 / StepSize) + RoundTO))           //number of STEPSIZE chunks
    ProfitPerCent = 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 - TradeBar
    IF BarCount MOD BarNumber = 0 THEN
    ProfitPerCent = ProfitPerCent + BarPerCent
    ENDIF
    //
    ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent))         //make sure ProfitPerCent doess not exceed 100%
    y2 = max(x2 * ProfitPerCent, y2)                                     //y2 = % of max profit
    ENDIF
    ENDIF
    IF 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 THEN
    SELL AT SellPrice STOP
    ELSE
    SELL AT SellPrice LIMIT
    ENDIF
    ELSE
    //
    //sell AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price
    //
    SELL AT Market
    ENDIF
    ENDIF
    IF 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 THEN
    EXITSHORT AT ExitPrice STOP
    ELSE
    EXITSHORT AT ExitPrice LIMIT
    ENDIF
    ELSE
    //
    //ExitShort AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price
    //
    EXITSHORT AT Market
    ENDIF
    ENDIF
    #193467 quote
    phoentzs
    Participant
    Master

    Controllo codice maxTrades x day

    Avec ce code, vous pouvez limiter les transactions par jour. C’est vraiment très utile.

    #193602 quote
    Marlaynicolas
    Participant
    New

    Bonjour phoentzs merci pour ton retour,

    Je recontre un souci, peux tu vérifier si j’ai bien mis les lignes de codes comme il le faut sur ma algo parce que j’ai bien l’impression qu’il continue à prendre plusieurs trades , Si tu peux me corriger je t’en remercie. Et avoir ton avis et les modifications que tu apporterais.

    Merci encore

     

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    // Annule tous les ordres en attente et ferme toutes les positions à l'heure "FLATAFTER"
    DEFPARAM FLATAFTER = 173000
    
    // 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ée
    noEntryBeforeTime = 153000
    timeEnterBefore = 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ée
    noEntryAfterTime = 173000
    timeEnterAfter = time < noEntryAfterTime
    
    // Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiés
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
    
    // Conditions pour ouvrir une position acheteuse
    indicator1 = RSI[14](close)
    c1 = (indicator1 CROSSES OVER 30)
    
    IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    once maxTrades = 1                              //maxNumberDailyTrades
    once tally = 0
    if intradayBarIndex = 0 then
    tally = 0
    endif
     
    newTrades =  (onMarket and not onMarket[1]) or (longOnMarket and shortOnMarket[1]) or (longOnMarket[1] and shortOnMarket) or ((not OnMarket and not onMarket[1]) and (strategyProfit <> strategyProfit[1])) or ((tradeIndex(1) = tradeIndex(2)) and (barIndex = tradeIndex(1)) and (barIndex > 0) and (strategyProfit = strategyProfit[1]))
     
    if newTrades then
    tally = tally +1
    endif
    // Conditions pour ouvrir une position en vente à découvert
    indicator2 = RSI[14](close)
    c2 = (indicator2 CROSSES UNDER 70)
    
    IF c2 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    once maxTrades = 1                              //maxNumberDailyTrades
    once tally = 0
    if intradayBarIndex = 0 then
    tally = 0
    endif
     
    newTrades =  (onMarket and not onMarket[1]) or (longOnMarket and shortOnMarket[1]) or (longOnMarket[1] and shortOnMarket) or ((not OnMarket and not onMarket[1]) and (strategyProfit <> strategyProfit[1])) or ((tradeIndex(1) = tradeIndex(2)) and (barIndex = tradeIndex(1)) and (barIndex > 0) and (strategyProfit = strategyProfit[1]))
     
    if newTrades then
    tally = tally +1
    endif
    // Stops et objectifs
    SET STOP pTRAILING 31
    SET TARGET pPROFIT 11
    IF Not OnMarket THEN
    //
    // when NOT OnMarket reset values to default values
    //
    TrailStart    = 5          //30     Start trailing profits from this point
    BasePerCent   = 0.000       //20.0%  Profit percentage to keep when setting BerakEven
    StepSize      = 10          //10     Pip chunks to increase Percentage
    PerCentInc    = 0.100       //10.0%  PerCent increment after each StepSize chunk
    BarNumber     = 10          //10     Add further % so that trades don't keep running too long
    BarPerCent    = 0.100       //10%    Add this additional percentage every BarNumber bars
    RoundTO       = -0.5        //-0.5   rounds always to Lower integer,   +0.4 rounds always to Higher integer,     0 defaults PRT behaviour
    PriceDistance = 7 * pipsize //7      minimun distance from current price
    y1            = 0           //reset to 0
    y2            = 0           //reset to 0
    ProfitPerCent = BasePerCent //reset to desired default value
    TradeBar      = BarIndex
    ELSIF 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 pips
    IF x1 >= TrailStart THEN                                                //    go ahead only if N+ pips
    Diff1         = abs(TrailStart - x1)                                 //difference from current profit and TrailStart
    Chunks1       = max(0,round((Diff1 / StepSize) + RoundTO))           //number of STEPSIZE chunks
    ProfitPerCent = 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 - TradeBar
    IF BarCount MOD BarNumber = 0 THEN
    ProfitPerCent = ProfitPerCent + BarPerCent
    ENDIF
    //
    ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent))         //make sure ProfitPerCent doess not exceed 100%
    y1 = max(x1 * ProfitPerCent, y1)                                     //y1 = % of max profit
    ENDIF
    ELSIF 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 pips
    IF x2 >= TrailStart THEN                                                //      go ahead only if N+ pips
    Diff2         = abs(TrailStart - x2)                                 //difference from current profit and TrailStart
    Chunks2       = max(0,round((Diff2 / StepSize) + RoundTO))           //number of STEPSIZE chunks
    ProfitPerCent = 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 - TradeBar
    IF BarCount MOD BarNumber = 0 THEN
    ProfitPerCent = ProfitPerCent + BarPerCent
    ENDIF
    //
    ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent))         //make sure ProfitPerCent doess not exceed 100%
    y2 = max(x2 * ProfitPerCent, y2)                                     //y2 = % of max profit
    ENDIF
    ENDIF
    IF 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 THEN
    SELL AT SellPrice STOP
    ELSE
    SELL AT SellPrice LIMIT
    ENDIF
    ELSE
    //
    //sell AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price
    //
    SELL AT Market
    ENDIF
    ENDIF
    IF 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 THEN
    EXITSHORT AT ExitPrice STOP
    ELSE
    EXITSHORT AT ExitPrice LIMIT
    ENDIF
    ELSE
    //
    //ExitShort AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price
    //
    EXITSHORT AT Market
    ENDIF
    ENDIF
    #193628 quote
    Marlaynicolas
    Participant
    New

    Je te remerci enormement pour ton aide. tu a changer la qualité de mon petit algo scalping. Je l’adopte sur du 10 sec et du 30 sec sur les différents indice. Je n’ai pas encore essayé sur le devises.

    Merci encore a bientot et bon dimanche a toi.

    #193646 quote
    phoentzs
    Participant
    Master

    Quelle version allez-vous utiliser maintenant ?

    Marlaynicolas thanked this post
    #193653 quote
    Marlaynicolas
    Participant
    New

    J’ai comparé la première et la deuxième. les gains sont meilleurs avec avec le premier de robberto. je vous enverrai ce soir âpres mon travail l’algo avec les paramètres un peu modifié. La seul chose que je regrette c’est que je ne peux  faire que un back test sur 90k bougies. Je l’ai effectué sur du graph 10sec et 30 sec sur les indices cac et dax le matin et le nasdaq et dow l’apres midi. Sachez que j’ai effectué cette technique que je suis depuis mi avril mais que je note chaque semaine le vendredi soir les résultats de chaque semaine. Les gains sont tjs supérieurs chaque semaine alors que je n’avais pas cette modification incorporé maintenant. Et les résultats son meilleurs avec 2 ou 5 trades par jours. Pour vous dire cette semaine avec votre aide la semaine était positive alors qu’elle aurait était négative. Si vous pouvez quand vous aurez mes algos pourriez vous voir avec un backtest et 2millions de bouggies me dire si le resultat est concluant. Merci encore .

    #193655 quote
    Marlaynicolas
    Participant
    New

    Je vous ferais une comparaison et vous enverrai en image avant et âpres intégration de votre aide. merci

    #193658 quote
    phoentzs
    Participant
    Master

    Malheureusement, je n’ai qu’un maximum de 1 semaine comme période de backtest dans ces unités de temps. À titre d’idée : peut-être que le système est plus viable si vous attribuez une tendance de haute qualité avec MTF ? Juste comme une idée.

    #193674 quote
    Marlaynicolas
    Participant
    New

    Voici le backtest réglé sur 5 trades en 10 sec avec tp 12 et stop a 28 sur nadasq

    // Définition des paramètres du code
    DEFPARAM CumulateOrders = False // Cumul des positions désactivé
    // Annule tous les ordres en attente et ferme toutes les positions à l'heure "FLATAFTER"
    DEFPARAM FLATAFTER = 173000
     
    // 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ée
    noEntryBeforeTime = 153000
    timeEnterBefore = 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ée
    noEntryAfterTime = 173000
    timeEnterAfter = time < noEntryAfterTime
     
    // Empêche le système de placer de nouveaux ordres sur les jours de la semaine spécifiés
    daysForbiddenEntry = OpenDayOfWeek = 6 OR OpenDayOfWeek = 0
     
    // Conditions pour ouvrir une position acheteuse
    indicator1 = RSI[13](close)
    c1 = (indicator1 CROSSES OVER 30)
     
    IF c1 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry and tally < maxTrades THEN
    BUY 1 CONTRACT AT MARKET
    ENDIF
    //---------------------------------------------------------------------------------------------------------------
    once maxTrades = 5                               //maxNumberDailyTrades
    once tally = 0
    if intradayBarIndex = 0 then
    tally = 0
    endif
     
    newTrades =  (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 then
    tally = tally +1
    endif
    //------------------------------------------------------------------------------------------------------------------------
    // Conditions pour ouvrir une position en vente à découvert
    indicator2 = RSI[13](close)
    c2 = (indicator2 CROSSES UNDER 70)
     
    IF c2 AND timeEnterBefore AND timeEnterAfter AND not daysForbiddenEntry and tally < maxTrades THEN
    SELLSHORT 1 CONTRACT AT MARKET
    ENDIF
    //---------------------------------------------------------------------------------------------------------------
    //Max-Orders per Day
    once maxOrdersL = 1  //long
    once maxOrdersS = 1  //short
    if intradayBarIndex = 0 then //reset orders count
    ordersCountL = 0
    ordersCountS = 0
    endif
     
    if longTriggered then //check if an order has opened in the current bar
    ordersCountL = ordersCountL + 1
    endif
    if shortTriggered then //check if an order has opened in the current bar
    ordersCountS = ordersCountS + 1
    endif
    //------------------------------------------------------------------------------------------------------------------------
    //Stops et objectifs
    SET STOP pTRAILING 28
    SET TARGET pPROFIT 12
    IF Not OnMarket THEN
    //
    // when NOT OnMarket reset values to default values
    //
    TrailStart    = 6          //30     Start trailing profits from this point
    BasePerCent   = 0.000       //20.0%  Profit percentage to keep when setting BerakEven
    StepSize      = 10          //10     Pip chunks to increase Percentage
    PerCentInc    = 0.100       //10.0%  PerCent increment after each StepSize chunk
    BarNumber     = 10          //10     Add further % so that trades don't keep running too long
    BarPerCent    = 0.100       //10%    Add this additional percentage every BarNumber bars
    RoundTO       = -0.5        //-0.5   rounds always to Lower integer,   +0.4 rounds always to Higher integer,     0 defaults PRT behaviour
    PriceDistance = 7 * pipsize //7      minimun distance from current price
    y1            = 0           //reset to 0
    y2            = 0           //reset to 0
    ProfitPerCent = BasePerCent //reset to desired default value
    TradeBar      = BarIndex
    ELSIF 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 pips
    IF x1 >= TrailStart THEN                                                //    go ahead only if N+ pips
    Diff1         = abs(TrailStart - x1)                                 //difference from current profit and TrailStart
    Chunks1       = max(0,round((Diff1 / StepSize) + RoundTO))           //number of STEPSIZE chunks
    ProfitPerCent = 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 - TradeBar
    IF BarCount MOD BarNumber = 0 THEN
    ProfitPerCent = ProfitPerCent + BarPerCent
    ENDIF
    //
    ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent))         //make sure ProfitPerCent doess not exceed 100%
    y1 = max(x1 * ProfitPerCent, y1)                                     //y1 = % of max profit
    ENDIF
    ELSIF 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 pips
    IF x2 >= TrailStart THEN                                                //      go ahead only if N+ pips
    Diff2         = abs(TrailStart - x2)                                 //difference from current profit and TrailStart
    Chunks2       = max(0,round((Diff2 / StepSize) + RoundTO))           //number of STEPSIZE chunks
    ProfitPerCent = 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 - TradeBar
    IF BarCount MOD BarNumber = 0 THEN
    ProfitPerCent = ProfitPerCent + BarPerCent
    ENDIF
    //
    ProfitPerCent = max(ProfitPerCent[1],min(100,ProfitPerCent))         //make sure ProfitPerCent doess not exceed 100%
    y2 = max(x2 * ProfitPerCent, y2)                                     //y2 = % of max profit
    ENDIF
    ENDIF
    IF 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 THEN
    SELL AT SellPrice STOP
    ELSE
    SELL AT SellPrice LIMIT
    ENDIF
    ELSE
    //
    //sell AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price
    //
    SELL AT Market
    ENDIF
    ENDIF
    IF 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 THEN
    EXITSHORT AT ExitPrice STOP
    ELSE
    EXITSHORT AT ExitPrice LIMIT
    ENDIF
    ELSE
    //
    //ExitShort AT MARKET when EXITPRICE does not meet the broker's minimun distance from current price
    //
    EXITSHORT AT Market
    ENDIF
    ENDIF
    #193676 quote
    Marlaynicolas
    Participant
    New

    Voici un aperçu du résultat

    Pour le 30 sec j’ai du utiliser la partie 2 les résultat était meilleurs avec juste 2 trades tp 11 et st 28

    Capture-decran-51.png Capture-decran-51.png Capture-decran-52.png Capture-decran-52.png Capture-decran-54.png Capture-decran-54.png
    #193680 quote
    phoentzs
    Participant
    Master

    Il sera intéressant de voir comment les choses évoluent en une semaine.

    #193681 quote
    Marlaynicolas
    Participant
    New

    Oui bien sûr . Je vous tiens au courant . Après peut être qu’avec un compte pro ils ont la possibilité de le tester sur du plus long terme .

    #193687 quote
    Marlaynicolas
    Participant
    New

    Bonjour,

    Je vous dérange 5 minutes, ce matin sur le dax 30 il  m’a pris qu’un trade alors que le backtest en signal 3 . Quelel est la raison ? Pouvez vous m’expliquer la raison?

    #193688 quote
    Nicolas
    Keymaster
    Master

    Parce que la température a fortement chuté je dirai 😆

    En fait, personne ne peut le savoir, il faudrait vérifier l’entrée et la sortie du trade qui est identique déjà, si celui-ci a durée plus longtemps, alors il a offusqué l’ouverture des autres ?

    Fais tu des backtests en tick par tick ? Avec une taille de spread adéquate renseigné dans la case correspondante ?

    Marlaynicolas thanked this post
    #193704 quote
    Marlaynicolas
    Participant
    New

    Bonjour nicolas,

    je me douté bien que cela venait de la température lol.

    Non je ne fais pas tick par tick mais je vais essayer. Oui j’ai réglé mon spread a 1.4 pour le dax.

    Dis moi par rapport au tick par tick il va falloir que je baisse mon tkp ? et mon stop est ce que je le change?

Viewing 15 posts - 1 through 15 (of 20 total)
  • You must be logged in to reply to this topic.

scalping rsi nasdaq 30 sec


ProOrder : Trading Automatique & Backtests

New Reply
Author
Summary

This topic contains 19 replies,
has 4 voices, and was last updated by Marlaynicolas
3 years, 9 months ago.

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 05/19/2022
Status: Active
Attachments: 5 files
Logo Logo
Loading...