screener semaphore quadratique
Forums › ProRealTime forum Français › Support ProScreener › screener semaphore quadratique
- This topic has 4 replies, 3 voices, and was last updated 4 years ago by Nicolas.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
09/28/2019 at 10:35 AM #108715
Bonjour Nicolas,
Je cherche à créer un screener avec ton indicateur sémaphore quadratique,mais je cale (trop de paramètres pour moi)
Peux-tu m’aider à faire ressortir les retournements bas (rond rouge) dans un screener.
Merci
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273//PRC_Quadratic Semaphore | indicator//25.08.2018//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge// --- settingslength = 30p=6// --- end of settingsx1 = barindexx2 = square(x1)//upper semaphorey = highS11 = summation[length](x2) - square(summation[length](x1))/lengthS12 = summation[length](x1*x2) - (summation[length](x1) * summation[length](x2))/lengthS22 = summation[length](square(x2)) - square(summation[length](x2))/lengthSy1 = summation[length](y*x1) - (summation[length](y)*summation[length](x1))/lengthSy2 = summation[length](y*x2) - (summation[length](y)*summation[length](x2))/lengthmax1 = average[length](x1)max2 = average[length](x2)may = average[length](y)b2 = ((Sy1 * S22) - (Sy2*S12))/(S22*S11 - square(S12))b3 = ((Sy2 * S11) - (Sy1 * S12))/(S22 * S11 - square(S12))b1 = may - b2*max1 - b3*max2qr = b1 + b2*x1 + b3*x2//lower semaphoreyl = lowSy1l = summation[length](yl*x1) - (summation[length](yl)*summation[length](x1))/lengthSy2l = summation[length](yl*x2) - (summation[length](yl)*summation[length](x2))/lengthmayl = average[length](yl)b2l = ((Sy1l * S22) - (Sy2l*S12))/(S22*S11 - square(S12))b3l = ((Sy2l * S11) - (Sy1l * S12))/(S22 * S11 - square(S12))b1l = mayl - b2l*max1 - b3l*max2qrl = b1l + b2l*x1 + b3l*x2period = round(p/2)+1hh = qr[period]ll = qrl[period]countH = 0countL = 0for i = 1 to period-1 doif qr[i]<hh thencountH=countH+1endifif qrl[i]>ll thencountL=countL+1endifnextfor i = period+1 to p+1 doif qr[i]<hh thencountH=countH+1endifif qrl[i]>ll thencountL=countL+1endifnextatr = averagetruerange[length]if countH=p thenpivotH = high[period]drawtext("●",barindex[period],pivotH+atr/2,dialog,bold,20) coloured(25,25,112)endifif countL=p thenpivotL = low[period]drawtext("●",barindex[period],pivotL-atr/2,dialog,bold,20) coloured(176,23,31)endifreturn09/30/2019 at 8:11 AM #108852J’étais pourtant persuadé d’avoir déjà créé ce screener, mais j’ai rien retrouvé 🙂 Bref, le code ci-dessous détectera les retournements haussiers (point rouge) et baissiers (point bleu).
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576//PRC_Quadratic Semaphore | indicator//25.08.2018//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge// --- settingslength = 30p=6// --- end of settingsx1 = barindexx2 = square(x1)//upper semaphorey = highS11 = summation[length](x2) - square(summation[length](x1))/lengthS12 = summation[length](x1*x2) - (summation[length](x1) * summation[length](x2))/lengthS22 = summation[length](square(x2)) - square(summation[length](x2))/lengthSy1 = summation[length](y*x1) - (summation[length](y)*summation[length](x1))/lengthSy2 = summation[length](y*x2) - (summation[length](y)*summation[length](x2))/lengthmax1 = average[length](x1)max2 = average[length](x2)may = average[length](y)b2 = ((Sy1 * S22) - (Sy2*S12))/(S22*S11 - square(S12))b3 = ((Sy2 * S11) - (Sy1 * S12))/(S22 * S11 - square(S12))b1 = may - b2*max1 - b3*max2qr = b1 + b2*x1 + b3*x2//lower semaphoreyl = lowSy1l = summation[length](yl*x1) - (summation[length](yl)*summation[length](x1))/lengthSy2l = summation[length](yl*x2) - (summation[length](yl)*summation[length](x2))/lengthmayl = average[length](yl)b2l = ((Sy1l * S22) - (Sy2l*S12))/(S22*S11 - square(S12))b3l = ((Sy2l * S11) - (Sy1l * S12))/(S22 * S11 - square(S12))b1l = mayl - b2l*max1 - b3l*max2qrl = b1l + b2l*x1 + b3l*x2period = round(p/2)+1hh = qr[period]ll = qrl[period]countH = 0countL = 0for i = 1 to period-1 doif qr[i]<hh thencountH=countH+1endifif qrl[i]>ll thencountL=countL+1endifnextfor i = period+1 to p+1 doif qr[i]<hh thencountH=countH+1endifif qrl[i]>ll thencountL=countL+1endifnext//atr = averagetruerange[length]if countH=p thenpivotH = high[period]//drawtext("●",barindex[period],pivotH+atr/2,dialog,bold,20) coloured(25,25,112)endifif countL=p thenpivotL = low[period]//drawtext("●",barindex[period],pivotL-atr/2,dialog,bold,20) coloured(176,23,31)endifblue=pivoth<>pivoth[1]red=pivotl<>pivotl[1]screener[blue or red]10/01/2019 at 3:59 PM #10901605/21/2020 at 1:41 PM #13258405/22/2020 at 9:08 AM #132763 -
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
Find exclusive trading pro-tools on
Similar topics: