Forums › ProRealTime foro Español › Soporte ProOrder › tenkan kijun 1h / 5m
Lo verifiqué, pero no entendí qué quieres hacer con esta estrategia, ¿te parece bien o no?
Para un screener, debe crear otro tema (también puede consultar este) en el soporte de ProScreener, indicando las diversas condiciones Long y Short.
Pueba esto:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
DEFPARAM CumulateOrders = FALSE // Timeframe(1h,UpdateOnClose) // — Ichimoku — myTenkanSen1 = (highest[7](high) + lowest[7](low)) / 2 myKijunSen1 = (highest[22](high) + lowest[22](low)) / 2 //mySpanA1 = (myTenkanSen1[26] + myKijunSen1[26]) / 2 //mySpanB1 = (highest[52](high[26]) + lowest[52](low[26])) / 2 //myChikou1 = close[26] L1 = myTenkanSen1 > myKijunSen1 S1 = myTenkanSen1 < myKijunSen1 // Timeframe(5 minute,UpdateOnClose) // — Ichimoku — myTenkanSen2 = (highest[7](high) + lowest[7](low)) / 2 myKijunSen2 = (highest[22](high) + lowest[22](low)) / 2 //mySpanA2 = (myTenkanSen2[26] + myKijunSen2[26]) / 2 //mySpanB2 = (highest[52](high[26]) + lowest[52](low[26])) / 2 //myChikou2 = close[26] L2 = myTenkanSen2 CROSSES OVER myKijunSen2 S2 = myTenkanSen2 CROSSES UNDER myKijunSen2 // Timeframe(default) ONCE Lbreak = 0 ONCE Sbreak = 0 // IF Lcond = 0 THEN Lcond = L1 AND L2 AND Not OnMarket IF Lcond THEN Scond = 0 ENDIF ENDIF IF Scond = 0 THEN Scond = S1 AND S2 AND Not OnMarket IF Scond THEN Lcond = 0 ENDIF ENDIF // IF Lcond and Not Lcond[1] THEN Lbreak = 0 MyHI = high[1] ELSIF Scond and Not Scond[1] THEN Sbreak = 0 MyLO = low[1] ENDIF IF OnMarket THEN Lcond = 0 Scond = 0 Lbreak = 0 Sbreak = 0 ENDIF IF Lcond THEN Lbreak = close CROSSES OVER MyHI ELSIF Scond THEN Sbreak = close CROSSES UNDER MyLO ENDIF // LONG IF Lcond AND Lbreak THEN BUY 1 CONTRACTS AT MARKET Lbreak = 0 ENDIF // condicions de sortida indicador1=myKijunSen2 c1 = (close < myKijunSen2) IF longonmarket and c1 then sell at market endif // SHORT IF Scond AND Sbreak THEN SELLSHORT 1 CONTRACTS AT MARKET ENDIF // exit short c2 = (close > myKijunSen2) if shortonmarket and c2 then Exitshort at market endif //SET TARGET pPROFIT 200 //SET STOP pLOSS 100 |