Traduction indicateur croisement RSI avec position cours au dessus des kama150
Forums › ProRealTime forum Français › Support ProScreener › Traduction indicateur croisement RSI avec position cours au dessus des kama150
- This topic has 3 replies, 2 voices, and was last updated 2 days ago by fifi743.
Viewing 4 posts - 1 through 4 (of 4 total)
-
-
01/18/2025 at 8:17 PM #242795Bonsoir,est-il possible d’avoir un screener à partir de cet indicateur ?Merci.Timeframe (1 hour,updateonclose)Period1h = 150FastPeriod1h = 2SlowPeriod1h = 50Fastest1h = 2 / (FastPeriod1h + 1)Slowest1h = 2 / (SlowPeriod1h + 1)if barindex < Period1h+1 thenKama1h=closeelseNum1h = abs(close–close[Period1h])Den1h = summation[Period1h](abs(close–close[1]))ER1h = Num1h / Den1hAlpha1h = SQUARE(ER1h *(Fastest1h – Slowest1h )+ Slowest1h)KAMA1h = (Alpha1h * Close) + ((1 –Alpha1h)* Kama1h[1])endifTimeframe (15 minutes,updateonclose)/////////////////////////////////////////////////////////////////// parameters KAMAPeriod15min = 150FastPeriod15min = 2SlowPeriod15min = 50Fastest15min = 2 / (FastPeriod15min + 1)Slowest15min = 2 / (SlowPeriod15min + 1)if barindex < Period15min+1 thenKama15min=closeelseNum15min = abs(close–close[Period15min])Den15min = summation[Period15min](abs(close–close[1]))ER15min = Num15min / Den15minAlpha15min = SQUARE(ER15min *(Fastest15min – Slowest15min )+ Slowest15min)KAMA15min = (Alpha15min * Close) + ((1 –Alpha15min)* Kama15min[1])endif//————————————-////PRC_RSI Cyclic Smoothed//version = 0//19.11.2024//Iván González @ http://www.prorealcode.com//Sharing ProRealTime knowledge//————————————-////Inputs//————————————-//src15min=closedomcycle15min=20cyclelen15min=domcycle15min/2vibration15min=10leveling15min=10cyclicmemory15min=domcycle15min*2once crsi15min=0//————————————-//// CRSI calculation//————————————-//torque15min=2/(vibration15min+1)phasinglag15min=floor((vibration15min–1)/2)length15min = cyclelen15minalpha15min = 1/length15minsrcUp15min = max(src15min–src15min[1],0)if barindex = length15min thenup15min = average[length15min](srcUp15min)elseup15min = alpha15min*srcUp15min + (1–alpha15min)*up15min[1]endifsrcDw15min = –min(src15min–src15min[1],0)if barindex = length15min thendw15min = average[length15min](srcdw15min)elsedw15min = alpha15min*srcdw15min + (1–alpha15min)*dw15min[1]endifif dw15min=0 thenmyrsi15min=100elsif up15min=0 thenmyrsi15min=0elsemyrsi15min=100–100/(1+up15min/dw15min)endifif barindex>cyclicmemory15min thencrsi15min=torque15min*(2*myrsi15min–myrsi15min[phasinglag15min])+(1–torque15min)*crsi15min[1]endif//————————————-//// LowBand and HighBand calculation//————————————-//Period15min=cyclicMemory15minpercent15min = leveling15min/100periodMinusone15min = period15min–1maxima15min = –999999.0minima15min = 999999.0for i15min=0 to periodMinusone15min doif crsi15min[i15min] > maxima15min thenmaxima15min = crsi15min[i15min]elsif crsi15min[i15min] < minima15min thenminima15min = crsi15min[i15min]endifnextstepfactor15min = (maxima15min–minima15min)/100lowband15min = 0for steps15min=0 to 100 dotestvalue15min = minima15min+stepfactor15min*steps15minbelow15min=0for m15min=0 to periodMinusone15min doif crsi15min[m15min]<testvalue15min thenbelow15min=below15min+1endifnextif below15min/period15min >= percent15min thenlowband15min = testvalue15minbreakendifnexthighband15min=0for steps15min=0 to 100 dotestvalue15min=maxima15min–stepfactor15min*steps15minabove15min=0for m15min=0 to periodMinusone15min doif crsi15min[m15min]>=testvalue15min thenabove15min=above15min+1endifnextif above15min/Period15min >= percent15min thenhighband15min=testvalue15minbreakendifnextmbb15min = average[50](crsi15min)CRSISmooth15min = average[7](crsi15min)LongPos = (kama1h > kama1h[1]) and (close > kama1h) and (kama15min > kama15min[1]) and (close > kama15min) and (CRSI15min crosses over CRSISmooth15min)if longpos thenbuy 1 contract at marketendifTimeframe (default)///trailing stop functiontrailingstart = 5 //trailing will start @trailinstart points profittrailingstep = 5 //trailing step to move the “stoploss”//reset the stoploss valueIF NOT ONMARKET THENnewSL=0ENDIF//manage long positionsIF LONGONMARKET THENIF newSL=0 AND close–tradeprice(1)>=trailingstart*pipsize THENnewSL = tradeprice(1)+trailingstep*pipsizeENDIF//next movesIF newSL>0 AND close–newSL>=trailingstep*pipsize THENnewSL = newSL+trailingstep*pipsizeENDIFENDIF//manage short positionsIF SHORTONMARKET THEN//first move (breakeven)IF newSL=0 AND tradeprice(1)–close>=trailingstart*pipsize THENnewSL = tradeprice(1)–trailingstep*pipsizeENDIF//next movesIF newSL>0 AND newSL–close>=trailingstep*pipsize THENnewSL = newSL–trailingstep*pipsizeENDIFENDIF//stop order to exit the positionsIF newSL>0 THENSELL AT newSL STOPEXITSHORT AT newSL STOPENDIF// points based STOP LOSS and TRAILING STOP// initial STOP LOSSSET STOP pLOSS 50// trailing stopSET STOP pTRAILING 5001/19/2025 at 8:50 AM #242798
a verifier,voici le code et ITF
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485// code proscreener d'exempleTimeframe (1 hour)Period1h = 150FastPeriod1h = 2SlowPeriod1h = 50Fastest1h = 2 / (FastPeriod1h + 1)Slowest1h = 2 / (SlowPeriod1h + 1)if barindex < Period1h+1 thenKama1h=closeelseNum1h = abs(close-close[Period1h])Den1h = summation[Period1h](abs(close-close[1]))ER1h = Num1h / Den1hAlpha1h = SQUARE(ER1h *(Fastest1h - Slowest1h )+ Slowest1h)KAMA1h = (Alpha1h * Close) + ((1 -Alpha1h)* Kama1h[1])endifTimeframe (15 minutes)/////////////////////////////////////////////////////////////////// parameters KAMAPeriod15min = 150FastPeriod15min = 2SlowPeriod15min = 50Fastest15min = 2 / (FastPeriod15min + 1)Slowest15min = 2 / (SlowPeriod15min + 1)if barindex < Period15min+1 thenKama15min=closeelseNum15min = abs(close-close[Period15min])Den15min = summation[Period15min](abs(close-close[1]))ER15min = Num15min / Den15minAlpha15min = SQUARE(ER15min *(Fastest15min - Slowest15min )+ Slowest15min)KAMA15min = (Alpha15min * Close) + ((1 -Alpha15min)* Kama15min[1])endif//————————————-////PRC_RSI Cyclic Smoothed//version = 0//19.11.2024//Iván González @ http://www.prorealcode.com//Sharing ProRealTime knowledge//————————————-////Inputs//————————————-//src15min=closedomcycle15min=20cyclelen15min=domcycle15min/2vibration15min=10//leveling15min=10cyclicmemory15min=domcycle15min*2once crsi15min=0//————————————-//// CRSI calculation//————————————-//torque15min=2/(vibration15min+1)phasinglag15min=floor((vibration15min-1)/2)length15min = cyclelen15minalpha15min = 1/length15minsrcUp15min = max(src15min-src15min[1],0)if barindex = length15min thenup15min = average[length15min](srcUp15min)elseup15min = alpha15min*srcUp15min + (1-alpha15min)*up15min[1]endifsrcDw15min = -min(src15min-src15min[1],0)if barindex = length15min thendw15min = average[length15min](srcdw15min)elsedw15min = alpha15min*srcdw15min + (1-alpha15min)*dw15min[1]endifif dw15min=0 thenmyrsi15min=100elsif up15min=0 thenmyrsi15min=0elsemyrsi15min=100-100/(1+up15min/dw15min)endifif barindex>cyclicmemory15min thencrsi15min=torque15min*(2*myrsi15min-myrsi15min[phasinglag15min])+(1-torque15min)*crsi15min[1]endifCRSISmooth15min = average[7](crsi15min)LongPos = (kama1h > kama1h[1]) and (close > kama1h) and (kama15min > kama15min[1]) and (close > kama15min) and (CRSI15min crosses over CRSISmooth15min)long=0if LongPos>0 thenlong=1endifSCREENER[long](Long as "signal")1 user thanked author for this post.
01/19/2025 at 9:21 AM #24280001/19/2025 at 10:06 AM #242803 -
AuthorPosts
Viewing 4 posts - 1 through 4 (of 4 total)
Find exclusive trading pro-tools on
Similar topics: