Advertisement
Maurizio-Ciullo

StudyPtnBaseSACrypto

Oct 15th, 2022 (edited)
707
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                // Inizio Codifica di tutti i Pattern Base Unger + Criptovalute Pinescipt //
  2.                                  // Aggiunti i pattern per le criptovalute sui 7 giorni numero: 41/42/43 //
  3.                    // A differenza dei pattern originali di Unger questi sono calcolati sul Tempo e Non Sulle Sessioni //
  4.                                 // Calcolati sul Tempo perchè Easylanguage non permette sessioni 24x7 7x7 //
  5.  
  6.  
  7.        // Modalità D'uso Vedi Video Unger: "Trading systems supremacy - Sviluppo Pattern Cartella 3 e Cartella Materiale Extra 12x3 //
  8.                   // Fare attenzione alle sessioni 0: Alcuni Orari di sessioni non permettono il calcolo sopra H1 o Daily //
  9.                     // per questo motivo bisognerà cambiare gli orari input.session del singolo indicatore timeframes H1 A Scendere//
  10.  
  11.                                             // Impostazioni Tradestation e Pinescript //
  12.                     // Orario Borsa // Exchange Time // Regular Session Tradestation // Upload Datafeed Tutti I Giorni 23:00 to 23:00 //
  13.  
  14.  
  15. //@version=5
  16. indicator(title="Study PtnBaseSaCrypto", overlay=true)//, precision=4)
  17.  
  18.  
  19. ///////////////////////// Inizio calcolo valori singoli Crypto Su Sessione Fine Giornata E Non Session //////////////////////////
  20.  
  21.  
  22. ///////////////////  Start Detecting High0 Session  ///////////////////
  23.  
  24. // Configure session with inputs
  25. session_high  = input.session("0000-2300", title="Trading Session")  // Cambia Orari Sessione Per Timeframe H1 o Minori, "Non Adatto Daily"
  26. timeZone_high = input.string("GMT", title="Time Zone")
  27.  
  28. // SessionHigh() returns the highest price during the specified
  29. // session, optionally corrected for the given time zone.
  30. // Returns 'na' when the session hasn't started or isn't on the chart.
  31. SessionHigh(sessionTime, sessionTimeZone=syminfo.timezone) =>
  32.     insideSession = not na(time(timeframe.period, sessionTime, sessionTimeZone))
  33.     var float sessionHighPrice = na
  34.  
  35.     if insideSession and not insideSession[1]
  36.         sessionHighPrice := high
  37.     else if not insideSession and high > sessionHighPrice // Inserito personalmente perchè se fuori sessione e massimo più alto non aggiornava
  38.         sessionHighPrice := high // // Inserito personalmente perchè se fuori sessione e massimo più alto non aggiornava
  39.     else if insideSession
  40.         sessionHighPrice := math.max(sessionHighPrice, high)
  41.    
  42.     sessionHighPrice
  43.  
  44. // InSession() returns 'true' when the current bar happens inside
  45. // the specified session, corrected for the given time zone (optional).
  46. // Returns 'false' when the bar doesn't happen in that time period,
  47. // or when the chart's time frame is 1 day or higher.
  48. InSessionHigh(sessionTimes, sessionTimeZone=syminfo.timezone) =>
  49.     not na(time(timeframe.period, sessionTimes, sessionTimeZone))
  50.  
  51. // Get the session high
  52. highd0 = SessionHigh(session_high, timeZone_high)
  53.  
  54. // Show the session high on the chart
  55. plot(highd0, color=color.green, title="Highd0")
  56.  
  57. // For visual verification, highlight the background of session bars
  58. bgcolor(InSessionHigh(session_high, timeZone_high) ? color.new(color.orange, 90) : na)
  59.  
  60. // ///////////////////  End Detecting High0 Session  ///////////////////
  61.  
  62.  
  63. // ///////////////////  Start Detecting Low0 Session  ///////////////////
  64.  
  65. // Configure session with inputs
  66. session_low  = input.session("0000-2300", title="Trading Session")  // Cambia Orari Sessione Per Timeframe H1 o Minori, "Non Adatto Daily"                                  
  67. timeZone_low = input.string("GMT", title="Time Zone")
  68.  
  69. // SessionLow() returns the lowest price during the specified
  70. // session, optionally corrected for the given time zone.
  71. // Returns 'na' when the session hasn't started or isn't on the chart.
  72. SessionLow(sessionTime, sessionTimeZone=syminfo.timezone) =>                                      
  73.     insideSession = not na(time(timeframe.period, sessionTime, sessionTimeZone))
  74.     var float sessionLowPrice = na
  75.  
  76.     if insideSession and not insideSession[1]
  77.         sessionLowPrice := low
  78.     else if not insideSession and low < sessionLowPrice // Inserito personalmente perchè se fuori sessione e minimo più basso non aggiornava
  79.         sessionLowPrice := low // // Inserito personalmente perchè se fuori sessione e minimo più basso non aggiornava
  80.     else if insideSession
  81.         sessionLowPrice := math.min(sessionLowPrice, low)
  82.    
  83.     sessionLowPrice
  84.  
  85. // InSession() returns 'true' when the current bar happens inside
  86. // the specified session, corrected for the given time zone (optional).
  87. // Returns 'false' when the bar doesn't happen in that time period,
  88. // or when the chart's time frame is 1 day or higher.
  89. InSessionLow(sessionTimes, sessionTimeZone=syminfo.timezone) =>
  90.     not na(time(timeframe.period, sessionTimes, sessionTimeZone))
  91.  
  92. // Get the session low
  93. lowd0 = SessionLow(session_low, timeZone_low)
  94.  
  95. // Show the session low on the chart
  96. //plot(lowd0, color=color.red, title="Lowd0")
  97.  
  98. // For visual verification, lowest the background of session bars
  99. //bgcolor(InSessionLow(session_low, timeZone_low) ? color.new(color.orange, 90) : na)
  100.  
  101. // ///////////////////  End Detecting Low0 Session  ///////////////////
  102.  
  103.  
  104. ///////////////////  Start Detecting Open0 Session  ///////////////////
  105.  
  106. // Configure session with inputs
  107. session_open  = input.session("0000-2300", title="Trading Session")  // Cambia Orari Sessione Per Timeframe H1 o Minori, "Non Adatto Daily"                                  
  108. timeZone_open = input.string("GMT", title="Time Zone")
  109.  
  110. // SessionOpen() returns the open price during the specified
  111. // session, optionally corrected for the given time zone.
  112. // Returns 'na' when the session hasn't started or isn't on the chart.
  113. SessionOpen(sessionTime, sessionTimeZone=syminfo.timezone) =>                                      
  114.     insideSession = not na(time(timeframe.period, sessionTime, sessionTimeZone))
  115.     var float sessionOpenPrice = na
  116.  
  117.     if insideSession and not insideSession[1]
  118.         sessionOpenPrice := open
  119.     //else if not insideSession and open < sessionOpenPrice // Inserito personalmente perchè se fuori sessione e minimo più basso non aggiornava
  120.         //sessionLowPrice := open // // Inserito personalmente perchè se fuori sessione e minimo più basso non aggiornava
  121.         // else if insideSession
  122.         //     sessionOpenPrice := (sessionOpenPrice, open)
  123.    
  124.     sessionOpenPrice
  125.  
  126. // InSession() returns 'true' when the current bar happens inside
  127. // the specified session, corrected for the given time zone (optional).
  128. // Returns 'false' when the bar doesn't happen in that time period,
  129. // or when the chart's time frame is 1 day or higher.
  130. InSessionOpen(sessionTimes, sessionTimeZone=syminfo.timezone) =>
  131.     not na(time(timeframe.period, sessionTimes, sessionTimeZone))
  132.  
  133. // Get the session open
  134. opend0 = SessionOpen(session_open, timeZone_open)
  135.  
  136. // Show the session open on the chart
  137. //plot(opend0, color=color.yellow, title="open0")
  138.  
  139. // For visual verification, open the background of session bars
  140. //bgcolor(InSessionOpen(session_open, timeZone_open) ? color.new(color.orange, 90) : na)
  141.      
  142. ///////////////////  End Detecting Open0 Session  ///////////////////
  143.  
  144.  
  145. ///////////////////  Start Detecting Close0 Session  ///////////////////
  146.  
  147. // Configure session with inputs
  148. session_close  = input.session("0000-2300", title="Trading Session")  // Cambia Orari Sessione Per Timeframe H1 o Minori, "Non Adatto Daily"                                  
  149. timeZone_close = input.string("GMT", title="Time Zone")
  150.  
  151. // SessionClose() returns the close price during the specified
  152. // session, optionally corrected for the given time zone.                        
  153. // Returns 'na' when the session hasn't started or isn't on the chart.
  154. SessionClose(sessionTime, sessionTimeZone=syminfo.timezone) =>                                      
  155.     insideSession = not na(time(timeframe.period, sessionTime, sessionTimeZone))
  156.     var float sessionClosePrice = na
  157.  
  158.     if insideSession and not insideSession[1]
  159.         sessionClosePrice := close
  160.     //else if not insideSession and close < sessionClosePrice // Inserito personalmente perchè se fuori sessione e minimo più basso non aggiornava
  161.         //sessionLowPrice := close // // Inserito personalmente perchè se fuori sessione e minimo più basso non aggiornava
  162.         // else if insideSession
  163.         //     sessionClosePrice := (sessionClosePrice, close)
  164.    
  165.     sessionClosePrice
  166.  
  167. // InSession() returns 'true' when the current bar happens inside              
  168. // the specified session, corrected for the given time zone (optional).
  169. // Returns 'false' when the bar doesn't happen in that time period,
  170. // or when the chart's time frame is 1 day or higher.
  171. InSessionClose(sessionTimes, sessionTimeZone=syminfo.timezone) =>
  172.     not na(time(timeframe.period, sessionTimes, sessionTimeZone))
  173.  
  174. // Get the session close
  175. close0 = SessionClose(session_close, timeZone_close)
  176.  
  177. // Show the session close on the chart
  178. //plot(close0, color=color.yellow, title="close0")
  179.  
  180. // For visual verification, close the background of session bars
  181. //bgcolor(InSessionClose(session_close, timeZone_close) ? color.new(color.orange, 90) : na)
  182.      
  183. ///////////////////  End Detecting Close0 Session  ///////////////////
  184.  
  185.  
  186. ///////////////////  Start Detecting HighD 0/1/2/3/4/5/6/7 Session  ///////////////////
  187.  
  188. //highd0 = request.security(syminfo.tickerid, "D", high, lookahead = barmerge.lookahead_on)    // SOLO PER TIMEFRAME DAILY //
  189. //plot(highd0, title="highd0")
  190. highd1 = request.security(syminfo.tickerid, "D", high[1], lookahead = barmerge.lookahead_on)
  191. //plot(highd1, title="highd1")
  192. highd2 = request.security(syminfo.tickerid, "D", high[2], lookahead = barmerge.lookahead_on)
  193. //plot(highd2, title="highd2")
  194. highd3 = request.security(syminfo.tickerid, "D", high[3], lookahead = barmerge.lookahead_on)
  195. //plot(highd3, title="highd3")
  196. highd4 = request.security(syminfo.tickerid, "D", high[4], lookahead = barmerge.lookahead_on)
  197. //plot(highd4, title="highd4")
  198. highd5 = request.security(syminfo.tickerid, "D", high[5], lookahead = barmerge.lookahead_on)
  199. //plot(highd5, title="highd5")
  200. highd6 = request.security(syminfo.tickerid, "D", high[6], lookahead = barmerge.lookahead_on)
  201. //plot(highd6, title="highd6")
  202. highd7 = request.security(syminfo.tickerid, "D", high[7], lookahead = barmerge.lookahead_on)
  203. //plot(highd7, title="highd7")
  204.  
  205. ///////////////////  End Detecting HighD 0/1/2/3/4/5/6/7 Session  ///////////////////
  206.  
  207.  
  208. ///////////////////  Start Detecting LowD 0/1/2/3/4/5/6/7 Session  ///////////////////
  209.  
  210. //lowd0 = request.security(syminfo.tickerid, "D", low, lookahead = barmerge.lookahead_on)    // SOLO PER TIMEFRAME DAILY //
  211. //plot(lowd0, title="lowd0")
  212. lowd1 = request.security(syminfo.tickerid, "D", low[1], lookahead = barmerge.lookahead_on)
  213. //plot(lowd1, title="lowd1")
  214. lowd2 = request.security(syminfo.tickerid, "D", low[2], lookahead = barmerge.lookahead_on)
  215. //plot(lowd2, title="lowd2")
  216. lowd3 = request.security(syminfo.tickerid, "D", low[3], lookahead = barmerge.lookahead_on)
  217. //plot(lowd3, title="lowd3")
  218. lowd4 = request.security(syminfo.tickerid, "D", low[4], lookahead = barmerge.lookahead_on)
  219. //plot(lowd4, title="lowd4")
  220. lowd5 = request.security(syminfo.tickerid, "D", low[5], lookahead = barmerge.lookahead_on)
  221. //plot(lowd5, title="lowd5")
  222. lowd6 = request.security(syminfo.tickerid, "D", low[6], lookahead = barmerge.lookahead_on)
  223. //plot(lowd6, title="lowd6")
  224. lowd7 = request.security(syminfo.tickerid, "D", low[7], lookahead = barmerge.lookahead_on)
  225. //plot(lowd7, title="lowd7")
  226.  
  227. ///////////////////  Start Detecting LowD 0/1/2/3/4/5/6/7 Session  ///////////////////
  228.  
  229.  
  230. ///////////////////  Start Detecting OpenD 0/1/2/3/4/5/6/7 Session  ///////////////////
  231.  
  232. //opend0 = request.security(syminfo.tickerid, "D", open, lookahead = barmerge.lookahead_on)    // SOLO PER TIMEFRAME DAILY //
  233. //plot(opend0, title="opend0")
  234. opend1 = request.security(syminfo.tickerid, "D", open[1], lookahead = barmerge.lookahead_on)
  235. //plot(opend1, title="opend1")
  236. opend2 = request.security(syminfo.tickerid, "D", open[2], lookahead = barmerge.lookahead_on)
  237. //plot(opend2, title="opend2")
  238. opend3 = request.security(syminfo.tickerid, "D", open[3], lookahead = barmerge.lookahead_on)
  239. //plot(opend3, title="opend3")
  240. opend4 = request.security(syminfo.tickerid, "D", open[4], lookahead = barmerge.lookahead_on)
  241. //plot(opend4, title="opend4")
  242. opend5 = request.security(syminfo.tickerid, "D", open[5], lookahead = barmerge.lookahead_on)
  243. //plot(opend5, title="opend5")
  244. opend6 = request.security(syminfo.tickerid, "D", open[6], lookahead = barmerge.lookahead_on)
  245. //plot(opend6, title="opend6")
  246. opend7 = request.security(syminfo.tickerid, "D", open[7], lookahead = barmerge.lookahead_on)
  247. //plot(opend7, title="opend7")
  248.  
  249. ///////////////////  End Detecting OpenD 0/1/2/3/4/5/6/7 Session  ///////////////////
  250.  
  251.  
  252. ///////////////////  Start Detecting CloseD 0/1/2/3/4/5/6/7 Session  ///////////////////
  253.  
  254. //closed0 = request.security(syminfo.tickerid, "D", close, lookahead = barmerge.lookahead_on)    // SOLO PER TIMEFRAME DAILY //
  255. //plot(closed0, title="closed0")
  256. closed1 = request.security(syminfo.tickerid, "D", close[1], lookahead = barmerge.lookahead_on)
  257. //plot(closed1, title="closed1")
  258. closed2 = request.security(syminfo.tickerid, "D", close[2], lookahead = barmerge.lookahead_on)
  259. //plot(closed2, title="closed2")
  260. closed3 = request.security(syminfo.tickerid, "D", close[3], lookahead = barmerge.lookahead_on)
  261. //plot(closed3, title="closed3")
  262. closed4 = request.security(syminfo.tickerid, "D", close[4], lookahead = barmerge.lookahead_on)
  263. //plot(closed4, title="closed4")
  264. closed5 = request.security(syminfo.tickerid, "D", close[5], lookahead = barmerge.lookahead_on)
  265. //plot(closed5, title="closed5")
  266. closed6 = request.security(syminfo.tickerid, "D", close[6], lookahead = barmerge.lookahead_on)
  267. //plot(closed6, title="closed6")
  268. closed7 = request.security(syminfo.tickerid, "D", close[7], lookahead = barmerge.lookahead_on)
  269. //plot(closed7, title="closed7")
  270.  
  271. ///////////////////  Fine Detecting CloseD 0/1/2/3/4/5/6/7 Session  ///////////////////
  272.  
  273.  
  274. //////////////////////////////////////////  Inizio Codifica di tutti i pattern base Unger Easylanguage  //////////////////////////////////////////
  275.                       // Per i range settimanali delle criptovalute alcuni pattern vanno estesi a 7 vedi video Unger //
  276.                                       // Decommentare i plot che servono sul momento //
  277.  
  278. PtnBaseSACrypto1  = math.abs(opend1-closed1)<0.5*(highd1-lowd1)                        
  279. plotshape(PtnBaseSACrypto1, title="PtnBaseSACrypto1")
  280.  
  281. // PtnBaseSACrypto2  = math.abs(opend1-closed5)<0.5*(highd5-closed1)
  282. // plotshape(PtnBaseSACrypto2, "PtnBaseSACrypto2")
  283.  
  284. // PtnBaseSACrypto3  = math.abs(opend5-closed1)<0.5*(math.max(highd1,highd2,highd3,highd4,highd5)-(math.min(lowd1,lowd2,lowd3,lowd4,lowd5)))
  285. // plotshape(PtnBaseSACrypto3, "PtnBaseSACrypto3")
  286.  
  287. // PtnBaseSACrypto4  = ((highd0-opend0)> ((highd1-opend1)*1))
  288. // plotshape(PtnBaseSACrypto4, "PtnBaseSACrypto4")
  289.  
  290. // PtnBaseSACrypto5  = ((highd0-opend0)> ((highd1-opend1)*1.5))
  291. // plotshape(PtnBaseSACrypto5, "PtnBaseSACrypto5")
  292.  
  293. // PtnBaseSACrypto6  = ((opend0-lowd0)> ((opend1-lowd1)*1))
  294. // plotshape(PtnBaseSACrypto6, "PtnBaseSACrypto6")
  295.  
  296. // PtnBaseSACrypto7  = ((opend0-lowd0)> ((opend1-lowd1)*1.5))
  297. // plotshape(PtnBaseSACrypto7, "PtnBaseSACrypto7")
  298.  
  299. // PtnBaseSACrypto8  = closed1>closed2 and closed2>closed3 and closed3>closed4
  300. // plotshape(PtnBaseSACrypto8, "PtnBaseSACrypto8")
  301.  
  302. // PtnBaseSACrypto9  = closed1<closed2 and closed2<closed3 and closed3<closed4
  303. // plotshape(PtnBaseSACrypto9, "PtnBaseSACrypto9")
  304.  
  305. // PtnBaseSACrypto10  = highd1>highd2 and lowd1>lowd2
  306. // plotshape(PtnBaseSACrypto10, "PtnBaseSACrypto10")
  307.  
  308. // PtnBaseSACrypto11  = highd1<highd2 and lowd1<lowd2
  309. // plotshape(PtnBaseSACrypto11, "PtnBaseSACrypto11")
  310.  
  311. // PtnBaseSACrypto12  = ((highd0>(lowd0+lowd0*0.75/100)))
  312. // plotshape(PtnBaseSACrypto12, "PtnBaseSACrypto12")
  313.  
  314. // PtnBaseSACrypto13  = ((highd0<(lowd0+lowd0*0.75/100)))
  315. // plotshape(PtnBaseSACrypto13, "PtnBaseSACrypto13")
  316.  
  317. // PtnBaseSACrypto14  = (closed1>closed2)
  318. // plotshape(PtnBaseSACrypto14, "PtnBaseSACrypto14")
  319.  
  320. // PtnBaseSACrypto15  = (closed1<closed2)
  321. // plotshape(PtnBaseSACrypto15, "PtnBaseSACrypto15")
  322.  
  323. // PtnBaseSACrypto16  = (closed1<opend1)
  324. // plotshape(PtnBaseSACrypto16, "PtnBaseSACrypto16")
  325.  
  326. // PtnBaseSACrypto17  = (closed1>opend1)
  327. // plotshape(PtnBaseSACrypto17, "PtnBaseSACrypto17")
  328.  
  329. // PtnBaseSACrypto18  = ((closed1<(closed2-closed2*0.5/100)))
  330. // plotshape(PtnBaseSACrypto18, "PtnBaseSACrypto18")
  331.  
  332. // PtnBaseSACrypto19  = ((closed1>(closed2+closed2*0.5/100)))
  333. // plotshape(PtnBaseSACrypto19, "PtnBaseSACrypto19")
  334.  
  335. // PtnBaseSACrypto20  = (highd0>(highd1))
  336. // plotshape(PtnBaseSACrypto20, "PtnBaseSACrypto20")
  337.  
  338. // PtnBaseSACrypto21  = (highd1>highd5)
  339. // plotshape(PtnBaseSACrypto21, "PtnBaseSACrypto21")
  340.  
  341. // PtnBaseSACrypto22  = (lowd0<lowd1)
  342. // plotshape(PtnBaseSACrypto22, "PtnBaseSACrypto22")
  343.  
  344. // PtnBaseSACrypto23  = (lowd1<lowd5)
  345. // plotshape(PtnBaseSACrypto23, "PtnBaseSACrypto23")
  346.  
  347. // PtnBaseSACrypto24  = (highd1>highd2) and (highd1>highd3) and (highd1>highd4)
  348. // plotshape(PtnBaseSACrypto24, "PtnBaseSACrypto24")
  349.  
  350. // PtnBaseSACrypto25  = (highd1<highd2) and (highd1<highd3) and (highd1<highd4)
  351. // plotshape(PtnBaseSACrypto25, "PtnBaseSACrypto25")
  352.  
  353. // PtnBaseSACrypto26  = ((lowd1<lowd2) and (lowd1<lowd3) and (lowd1<lowd4))
  354. // plotshape(PtnBaseSACrypto26, "PtnBaseSACrypto26")
  355.  
  356. // PtnBaseSACrypto27  = ((lowd1>lowd2) and (lowd1>lowd3) and (lowd1<lowd4))
  357. // plotshape(PtnBaseSACrypto27, "PtnBaseSACrypto27")  
  358.  
  359. // PtnBaseSACrypto28  = (closed1>closed2 and closed2>closed3 and opend0>closed1)
  360. // plotshape(PtnBaseSACrypto28, "PtnBaseSACrypto28")
  361.  
  362. // PtnBaseSACrypto29  = (closed1<closed2 and closed2<closed3 and opend0<closed1)
  363. // plotshape(PtnBaseSACrypto29, "PtnBaseSACrypto29")
  364.  
  365. // PtnBaseSACrypto30  = ((highd1-closed1)<0.20*(highd1-lowd1))
  366. // plotshape(PtnBaseSACrypto30, "PtnBaseSACrypto30")
  367.  
  368. // PtnBaseSACrypto31  = ((closed1-lowd1)<0.20*(highd1-lowd1))
  369. // plotshape(PtnBaseSACrypto31, "PtnBaseSACrypto31")
  370.      
  371. // PtnBaseSACrypto32  = (opend0<lowd1 or opend0>highd1)
  372. // plotshape(PtnBaseSACrypto32, "PtnBaseSACrypto32")
  373.  
  374. // PtnBaseSACrypto33  = ((opend0<(closed1-closed1*0.5/100)))
  375. // plotshape(PtnBaseSACrypto33, "PtnBaseSACrypto33")
  376.  
  377. // PtnBaseSACrypto34  = ((opend0>(closed1+closed1*0.5/100)))
  378. // plotshape(PtnBaseSACrypto34, "PtnBaseSACrypto34")
  379.  
  380. // PtnBaseSACrypto35  = (highd0<highd1 and lowd0>lowd1)
  381. // plotshape(PtnBaseSACrypto35, "PtnBaseSACrypto35")
  382.  
  383. // PtnBaseSACrypto36  = (highd1-lowd1)<((highd2-lowd2)+(highd3-lowd3))/3
  384. // plotshape(PtnBaseSACrypto36, "PtnBaseSACrypto36")
  385.  
  386. // PtnBaseSACrypto37  = (highd1-lowd1)<(highd2-lowd2) and (highd2-lowd2)<(highd3-lowd3)
  387. // plotshape(PtnBaseSACrypto37, "PtnBaseSACrypto37")
  388.  
  389. // PtnBaseSACrypto38  = (highd2>highd1 and lowd2<lowd1)
  390. // plotshape(PtnBaseSACrypto38, "PtnBaseSACrypto38")
  391.  
  392. // PtnBaseSACrypto39  = (highd1<highd2 or lowd1>lowd2)
  393. // plotshape(PtnBaseSACrypto39, "PtnBaseSACrypto39")
  394.  
  395. // PtnBaseSACrypto40  = (highd2<highd1 and lowd2>lowd1)
  396. // plotshape(PtnBaseSACrypto40, "PtnBaseSACrypto40")
  397.  
  398. // PtnBaseSACrypto41  = math.abs(opend7-closed1)<0.5*(math.max(highd1,highd2,highd3,highd4,highd5,highd6,highd7)-(math.min(lowd1,lowd2,lowd3,lowd4,lowd5,lowd6,lowd7)))
  399. // plotshape(PtnBaseSACrypto41, "PtnBaseSACrypto41")
  400.  
  401. // PtnBaseSACrypto42  = (highd1>highd7)
  402. // plotshape(PtnBaseSACrypto42, "PtnBaseSACrypto42")
  403.  
  404. // PtnBaseSACrypto43  = (lowd1<lowd7)
  405. // plotshape(PtnBaseSACrypto43, "PtnBaseSACrypto43")
  406.  
  407. // PtnBaseSACrypto44  = true
  408. // plotshape(PtnBaseSACrypto44, "PtnBaseSACrypto44")
  409.  
  410. // PtnBaseSACrypto45  = false
  411. // plotshape(PtnBaseSACrypto45, "PtnBaseSACrypto45")
  412.  
  413. //////////////////////////////////////////  Fine Codifica di tutti i pattern base Unger Easylanguage  //////////////////////////////////////////
  414.  
  415.  
  416.                ////////////////////////////  Inizio Spiegazione di tutti i pattern base Unger ////////////////////////////
  417.                   /////// Per i range settimanali delle criptovalute alcuni pattern sono stati estesi a 7 vedi video Unger ///////
  418.  
  419. // PtnBaseSA1 = // volatility (indecision) // yesterday body < 50% of  range // No Opposite //
  420.  
  421. // PtnBaseSA2 = // volatility (indecision) // open yesterday - close 5 days ago < 50% of (high 5 days ago - close yesterday) // No Opposite //
  422.  
  423. // PtnBaseSA3 = // volatility (indecision) // open of 5 days ago - close of yesterday < 50% of range of last 5 days // No Opposite //
  424.  
  425. // PtnBaseSA3 = // volatility (indecision) // open of 5 days ago - close of yesterday < 50% of range of last 5 days // No Opposite //
  426.  
  427. // PtnBaseSA4 = // directional - up // high to open today so far > high to open of yesterday // Opposite 6 //
  428.  
  429. // PtnBaseSA5 = // directional - up // high to open today so far > 1.5 * (high to open of yesterday) // Opposite 7 //
  430.  
  431. // PtnBaseSA6 = // directional - down // open to low today so far > open to low of yesterday // Opposite 4 //
  432.  
  433. // PtnBaseSA7 = // directional - down // open to low today so far > 1.5 * (open to low of yesterday) // Opposite 5 //
  434.  
  435. // PtnBaseSA8 = // directional - up // 3 consecutive up closes // Opposite 9 //
  436.  
  437. // PtnBaseSA9 = // directional - down // 3 consecutive down closes // Opposite 8 //
  438.  
  439. // PtnBaseSA10 = // directional - up // 2 higher highs and higher lows // Opposite 11 //
  440.  
  441. // PtnBaseSA11 = // directional - down // 2 lower highs and lower lows // Opposite 10 //
  442.  
  443. // PtnBaseSA12 = // expansion // range of today > 0.75% of low of today // Opposite 13 //
  444.  
  445. // PtnBaseSA13 = // compression // range of today < 0.75% of low of today // Opposite 12 //
  446.  
  447. // PtnBaseSA14 = // directional - up // price advanced yesterday // Opposite 15 //
  448.  
  449. // PtnBaseSA15 = // directional - down // price declined yesterday // Opposite 14 //
  450.  
  451. // PtnBaseSA16 = // directional - up // yesterday closed below the open // Opposite 17 //
  452.  
  453. // PtnBaseSA17 = // directional - down // yesterday closed above the open // Opposite 16 //
  454.  
  455. // PtnBaseSA18 = // directional - down // price declined > 0.5% yesterday // Opposite 19 //
  456.  
  457. // PtnBaseSA19 = // directional - up // price advanced > 0.5% yesterday // Opposite 18 //
  458.  
  459. // PtnBaseSA20 = // directional - up // today has traded above yesterday's high // Opposite 22 //
  460.  
  461. // PtnBaseSA21 = // trend - up // yesterday high was above 5-day-ago high // Opposite 23 //
  462.  
  463. // PtnBaseSA22 = // weakness today // today has traded below yesterday's low // Opposite 20 //
  464.  
  465. // PtnBaseSA23 = // trend - down // yesterday low was below 5-day-ago low // Opposite 21 //
  466.  
  467. // PtnBaseSA24 = // trend - up // yesterday high was the highest  in 4 days // Opposite 26 //
  468.  
  469. // PtnBaseSA25 = // not trend up // yesterday high was lowest  in 4 days // Opposite 27 //
  470.  
  471. // PtnBaseSA26 = // trend - down // yesterday low was lowest  in 4 days // Opposite 24 //
  472.  
  473. // PtnBaseSA27 = // not trend down // yesterday low was the highest  in 4 days // Opposite 25 //
  474.  
  475. // PtnBaseSA28 = // trend - up // yesterday close was highest in 3 days and today open is higher // Opposite 29 //
  476.  
  477. // PtnBaseSA29 = // trend - down // yesterday close was lowest in 3 days and today open is lower // Opposite 28 //
  478.  
  479. // PtnBaseSA30 = // strength yesterday // yesterday close was in the top 20% of yesterday range // Opposite 31 //
  480.  
  481. // PtnBaseSA31 = // weakness yesterday // yesterday close was in the bottom 20% of yesterday range // Opposite 30 //
  482.  
  483. // PtnBaseSA32 = // movement // today open gapped either above yest. high or below yest. low //
  484.  
  485. // PtnBaseSA33 = // big gap down // today open is at least 0.5% below yesterday close // Opposite 34 //
  486.  
  487. // PtnBaseSA34 = // big gap up // today open is at least 0.5% above yesterday close // Opposite 33 //
  488.  
  489. // PtnBaseSA35 = // big gap up // today open is at least 0.5% above yesterday close //
  490.  
  491. // PtnBaseSA36 = // volatility contraction // yesterday range < 2/3 (66%) of prior 2-day avg. range // No Opposite //
  492.  
  493. // PtnBaseSA37 = // volatility contraction // yesterday was second consecutive range contraction day // No Opposite //
  494.  
  495. // PtnBaseSA38 = // volatility contraction // yesterday was an inside day // No Opposite //
  496.  
  497. // PtnBaseSA39 = // volatility contraction // yesterday was not an outside day // Opposite 40 //
  498.  
  499.  //PtnBaseSA40 = // volatility expansion // yesterday was an outside day // Opposite 39 //
  500.  
  501.  //PtnBaseSA41 = // volatility (indecision) // open of 7 days ago - close of yesterday < 50% of range of last 7 days // No Opposite //
  502.  
  503.  //PtnBaseSA42 = // trend - up // yesterday high was above 7-day-ago high // Opposite 43 //
  504.  
  505.  //PtnBaseSA43 = // trend - down // yesterday low was below 7-day-ago low // Opposite 42 //
  506.  
  507. // PtnBaseSA44 = true // boolean // true // Opposite 45 //
  508.  
  509. // PtnBaseSA45 = false // boolean // false // Opposite 44 //
  510.  
  511.                ////////////////////////////  Fine Spiegazione di tutti i pattern base Unger ////////////////////////////
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement