xmd79

harmonicpatterns

Nov 19th, 2021
257
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 21.00 KB | None | 0 0
  1. // This source code is subject to the terms of the Mozilla Public License 2.0 at https://mozilla.org/MPL/2.0/
  2. // © HeWhoMustNotBeNamed
  3.  
  4. // __ __ __ __ __ __ __ __ __ __ __ _______ __ __ __
  5. // / | / | / | _ / |/ | / \ / | / | / \ / | / | / \ / \ / | / |
  6. // $$ | $$ | ______ $$ | / \ $$ |$$ |____ ______ $$ \ /$$ | __ __ _______ _$$ |_ $$ \ $$ | ______ _$$ |_ $$$$$$$ | ______ $$ \ $$ | ______ _____ ____ ______ ____$$ |
  7. // $$ |__$$ | / \ $$ |/$ \$$ |$$ \ / \ $$$ \ /$$$ |/ | / | / |/ $$ | $$$ \$$ | / \ / $$ | $$ |__$$ | / \ $$$ \$$ | / \ / \/ \ / \ / $$ |
  8. // $$ $$ |/$$$$$$ |$$ /$$$ $$ |$$$$$$$ |/$$$$$$ |$$$$ /$$$$ |$$ | $$ |/$$$$$$$/ $$$$$$/ $$$$ $$ |/$$$$$$ |$$$$$$/ $$ $$< /$$$$$$ |$$$$ $$ | $$$$$$ |$$$$$$ $$$$ |/$$$$$$ |/$$$$$$$ |
  9. // $$$$$$$$ |$$ $$ |$$ $$/$$ $$ |$$ | $$ |$$ | $$ |$$ $$ $$/$$ |$$ | $$ |$$ \ $$ | __ $$ $$ $$ |$$ | $$ | $$ | __ $$$$$$$ |$$ $$ |$$ $$ $$ | / $$ |$$ | $$ | $$ |$$ $$ |$$ | $$ |
  10. // $$ | $$ |$$$$$$$$/ $$$$/ $$$$ |$$ | $$ |$$ \__$$ |$$ |$$$/ $$ |$$ \__$$ | $$$$$$ | $$ |/ |$$ |$$$$ |$$ \__$$ | $$ |/ |$$ |__$$ |$$$$$$$$/ $$ |$$$$ |/$$$$$$$ |$$ | $$ | $$ |$$$$$$$$/ $$ \__$$ |
  11. // $$ | $$ |$$ |$$$/ $$$ |$$ | $$ |$$ $$/ $$ | $/ $$ |$$ $$/ / $$/ $$ $$/ $$ | $$$ |$$ $$/ $$ $$/ $$ $$/ $$ |$$ | $$$ |$$ $$ |$$ | $$ | $$ |$$ |$$ $$ |
  12. // $$/ $$/ $$$$$$$/ $$/ $$/ $$/ $$/ $$$$$$/ $$/ $$/ $$$$$$/ $$$$$$$/ $$$$/ $$/ $$/ $$$$$$/ $$$$/ $$$$$$$/ $$$$$$$/ $$/ $$/ $$$$$$$/ $$/ $$/ $$/ $$$$$$$/ $$$$$$$/
  13. //
  14. //
  15. //
  16. //@version=5
  17. // @description harmonicpatterns: methods required for calculation of harmonic patterns
  18. library("harmonicpatterns")
  19.  
  20. isInRange(ratio, min, max)=> ratio >= min and ratio <= max
  21.  
  22.  
  23. // @function isGartleyPattern: Checks for harmonic pattern Gartley
  24. // @param xabRatio AB/XA
  25. // @param abcRatio BC/AB
  26. // @param bcdRatio CD/BC
  27. // @param xadRatio AD/XA
  28. // @param err_min Minumum error threshold
  29. // @param err_max Maximum error threshold
  30. // @returns True if the pattern is Gartley. False otherwise.
  31. export isGartleyPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  32. xabMin = 0.618 * err_min
  33. xabMax = 0.618 * err_max
  34. abcMin = 0.382 * err_min
  35. abcMax = 0.886 * err_max
  36. bcdMin = 1.272 * err_min
  37. bcdMax = 1.618 * err_max
  38. xadMin = 0.786 * err_min
  39. xadMax = 0.786 * err_max
  40. enable and
  41. isInRange(xabRatio, xabMin, xabMax) and
  42. isInRange(abcRatio, abcMin, abcMax) and
  43. isInRange(bcdRatio, bcdMin, bcdMax) and
  44. isInRange(xadRatio, xadMin, xadMax)
  45.  
  46. // @function isBatPattern: Checks for harmonic pattern Bat
  47. // @param xabRatio AB/XA
  48. // @param abcRatio BC/AB
  49. // @param bcdRatio CD/BC
  50. // @param xadRatio AD/XA
  51. // @param err_min Minumum error threshold
  52. // @param err_max Maximum error threshold
  53. // @returns True if the pattern is Bat. False otherwise.
  54. export isBatPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  55. xabMin = 0.382 * err_min
  56. xabMax = 0.50 * err_max
  57. abcMin = 0.382 * err_min
  58. abcMax = 0.886 * err_max
  59. bcdMin = 1.618 * err_min
  60. bcdMax = 2.618 * err_max
  61. xadMin = 0.886 * err_min
  62. xadMax = 0.886 * err_max
  63. enable and
  64. isInRange(xabRatio, xabMin, xabMax) and
  65. isInRange(abcRatio, abcMin, abcMax) and
  66. isInRange(bcdRatio, bcdMin, bcdMax) and
  67. isInRange(xadRatio, xadMin, xadMax)
  68.  
  69. // @function isButterflyPattern: Checks for harmonic pattern Butterfly
  70. // @param xabRatio AB/XA
  71. // @param abcRatio BC/AB
  72. // @param bcdRatio CD/BC
  73. // @param xadRatio AD/XA
  74. // @param err_min Minumum error threshold
  75. // @param err_max Maximum error threshold
  76. // @returns True if the pattern is Butterfly. False otherwise.
  77. export isButterflyPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  78. xabMin = 0.786 * err_min
  79. xabMax = 0.786 * err_max
  80. abcMin = 0.382 * err_min
  81. abcMax = 0.886 * err_max
  82. bcdMin = 1.618 * err_min
  83. bcdMax = 2.618 * err_max
  84. xadMin = 1.272
  85. xadMax = 1.618
  86. enable and
  87. isInRange(xabRatio, xabMin, xabMax) and
  88. isInRange(abcRatio, abcMin, abcMax) and
  89. isInRange(bcdRatio, bcdMin, bcdMax) and
  90. isInRange(xadRatio, xadMin, xadMax)
  91.  
  92. // @function isCrabPattern: Checks for harmonic pattern Crab
  93. // @param xabRatio AB/XA
  94. // @param abcRatio BC/AB
  95. // @param bcdRatio CD/BC
  96. // @param xadRatio AD/XA
  97. // @param err_min Minumum error threshold
  98. // @param err_max Maximum error threshold
  99. // @returns True if the pattern is Crab. False otherwise.
  100. export isCrabPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  101. xabMin = 0.382 * err_min
  102. xabMax = 0.618 * err_max
  103. abcMin = 0.382 * err_min
  104. abcMax = 0.886 * err_max
  105. bcdMin = 2.24 * err_min
  106. bcdMax = 3.618 * err_max
  107. xadMin = 1.618 * err_min
  108. xadMax = 1.618 * err_max
  109. enable and
  110. isInRange(xabRatio, xabMin, xabMax) and
  111. isInRange(abcRatio, abcMin, abcMax) and
  112. isInRange(bcdRatio, bcdMin, bcdMax) and
  113. isInRange(xadRatio, xadMin, xadMax)
  114.  
  115. // @function isDeepCrabPattern: Checks for harmonic pattern DeepCrab
  116. // @param xabRatio AB/XA
  117. // @param abcRatio BC/AB
  118. // @param bcdRatio CD/BC
  119. // @param xadRatio AD/XA
  120. // @param err_min Minumum error threshold
  121. // @param err_max Maximum error threshold
  122. // @returns True if the pattern is DeepCrab. False otherwise.
  123. export isDeepCrabPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  124. xabMin = 0.886 * err_min
  125. xabMax = 0.886 * err_max
  126. abcMin = 0.382 * err_min
  127. abcMax = 0.886 * err_max
  128. bcdMin = 2.00 * err_min
  129. bcdMax = 3.618 * err_max
  130. xadMin = 1.618 * err_min
  131. xadMax = 1.618 * err_max
  132. enable and
  133. isInRange(xabRatio, xabMin, xabMax) and
  134. isInRange(abcRatio, abcMin, abcMax) and
  135. isInRange(bcdRatio, bcdMin, bcdMax) and
  136. isInRange(xadRatio, xadMin, xadMax)
  137.  
  138. // @function isCypherPattern: Checks for harmonic pattern Cypher
  139. // @param xabRatio AB/XA
  140. // @param axcRatio XC/AX
  141. // @param xadRatio AD/XA
  142. // @param err_min Minumum error threshold
  143. // @param err_max Maximum error threshold
  144. // @returns True if the pattern is Cypher. False otherwise.
  145. export isCypherPattern(float xabRatio, float axcRatio, float xcdRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  146. xabMin = 0.382 * err_min
  147. xabMax = 0.618 * err_max
  148. axcMin = 1.13 * err_min
  149. axcMax = 1.414 * err_max
  150. xcdMin = 0.786 * err_min
  151. xcdMax = 0.786 * err_max
  152. enable and
  153. isInRange(xabRatio, xabMin, xabMax) and
  154. isInRange(axcRatio, axcMin, axcMax) and
  155. isInRange(xcdRatio, xcdMin, xcdMax)
  156.  
  157. // @function isSharkPattern: Checks for harmonic pattern Shark
  158. // @param xabRatio AB/XA
  159. // @param abcRatio BC/AB
  160. // @param bcdRatio CD/BC
  161. // @param xadRatio AD/XA
  162. // @param err_min Minumum error threshold
  163. // @param err_max Maximum error threshold
  164. // @returns True if the pattern is Shark. False otherwise.
  165. export isSharkPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  166. xabMin = 0.446 * err_min
  167. xabMax = 0.618 * err_max
  168. abcMin = 1.13 * err_min
  169. abcMax = 1.618 * err_max
  170. bcdMin = 1.618 * err_min
  171. bcdMax = 2.236 * err_max
  172. xadMin = 0.886 * err_min
  173. xadMax = 0.886 * err_max
  174. enable and
  175. isInRange(xabRatio, xabMin, xabMax) and
  176. isInRange(abcRatio, abcMin, abcMax) and
  177. isInRange(bcdRatio, bcdMin, bcdMax) and
  178. isInRange(xadRatio, xadMin, xadMax)
  179.  
  180. // @function isNenStarPattern: Checks for harmonic pattern Nenstar
  181. // @param xabRatio AB/XA
  182. // @param abcRatio BC/AB
  183. // @param bcdRatio CD/BC
  184. // @param xadRatio AD/XA
  185. // @param err_min Minumum error threshold
  186. // @param err_max Maximum error threshold
  187. // @returns True if the pattern is Nenstar. False otherwise.
  188. export isNenStarPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  189. xabMin = 0.382 * err_min
  190. xabMax = 0.618 * err_max
  191. abcMin = 1.414 * err_min
  192. abcMax = 2.140 * err_max
  193. bcdMin = 1.272 * err_min
  194. bcdMax = 2.0 * err_max
  195. xadMin = 1.272 * err_min
  196. xadMax = 1.272 * err_max
  197. enable and
  198. isInRange(xabRatio, xabMin, xabMax) and
  199. isInRange(abcRatio, abcMin, abcMax) and
  200. isInRange(bcdRatio, bcdMin, bcdMax) and
  201. isInRange(xadRatio, xadMin, xadMax)
  202.  
  203. // @function isAntiNenStarPattern: Checks for harmonic pattern Anti NenStar
  204. // @param xabRatio - AB/XA
  205. // @param abcRatio - BC/AB
  206. // @param bcdRatio - CD/BC
  207. // @param xadRatio - AD/XA
  208. // @param err_min - Minumum error threshold
  209. // @param err_max - Maximum error threshold
  210. // @returns True if the pattern is Anti NenStar. False otherwise.
  211. export isAntiNenStarPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  212. xabMin = 0.5 * err_min
  213. xabMax = 0.786 * err_max
  214. abcMin = 0.467 * err_min
  215. abcMax = 0.707 * err_max
  216. bcdMin = 1.618 * err_min
  217. bcdMax = 2.618 * err_max
  218. xadMin = 0.786 * err_min
  219. xadMax = 0.786 * err_max
  220. enable and
  221. isInRange(xabRatio, xabMin, xabMax) and
  222. isInRange(abcRatio, abcMin, abcMax) and
  223. isInRange(bcdRatio, bcdMin, bcdMax) and
  224. isInRange(xadRatio, xadMin, xadMax)
  225.  
  226. // @function isAntiSharkPattern: Checks for harmonic pattern Anti Shark
  227. // @param xabRatio AB/XA
  228. // @param abcRatio BC/AB
  229. // @param bcdRatio CD/BC
  230. // @param xadRatio AD/XA
  231. // @param err_min Minumum error threshold
  232. // @param err_max Maximum error threshold
  233. // @returns True if the pattern is Anti Shark. False otherwise.
  234. export isAntiSharkPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  235. xabMin = 0.446 * err_min
  236. xabMax = 0.618 * err_max
  237. abcMin = 0.618 * err_min
  238. abcMax = 0.886 * err_max
  239. bcdMin = 1.618 * err_min
  240. bcdMax = 2.618 * err_max
  241. xadMin = 1.13 * err_min
  242. xadMax = 1.13 * err_max
  243. enable and
  244. isInRange(xabRatio, xabMin, xabMax) and
  245. isInRange(abcRatio, abcMin, abcMax) and
  246. isInRange(bcdRatio, bcdMin, bcdMax) and
  247. isInRange(xadRatio, xadMin, xadMax)
  248.  
  249. // @function isAntiCypherPattern: Checks for harmonic pattern Anti Cypher
  250. // @param xabRatio AB/XA
  251. // @param abcRatio BC/AB
  252. // @param bcdRatio CD/BC
  253. // @param xadRatio AD/XA
  254. // @param err_min Minumum error threshold
  255. // @param err_max Maximum error threshold
  256. // @returns True if the pattern is Anti Cypher. False otherwise.
  257. export isAntiCypherPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  258. xabMin = 0.5 * err_min
  259. xabMax = 0.786 * err_max
  260. abcMin = 0.467 * err_min
  261. abcMax = 0.707 * err_max
  262. bcdMin = 1.618 * err_min
  263. bcdMax = 2.618 * err_max
  264. xadMin = 1.272 * err_min
  265. xadMax = 1.272 * err_max
  266. enable and
  267. isInRange(xabRatio, xabMin, xabMax) and
  268. isInRange(abcRatio, abcMin, abcMax) and
  269. isInRange(bcdRatio, bcdMin, bcdMax) and
  270. isInRange(xadRatio, xadMin, xadMax)
  271.  
  272. // @function isAntiCrabPattern: Checks for harmonic pattern Anti Crab
  273. // @param xabRatio AB/XA
  274. // @param abcRatio BC/AB
  275. // @param bcdRatio CD/BC
  276. // @param xadRatio AD/XA
  277. // @param err_min Minumum error threshold
  278. // @param err_max Maximum error threshold
  279. // @returns True if the pattern is Anti Crab. False otherwise.
  280. export isAntiCrabPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  281. xabMin = 0.276 * err_min
  282. xabMax = 0.446 * err_max
  283. abcMin = 1.128 * err_min
  284. abcMax = 2.618 * err_max
  285. bcdMin = 1.618 * err_min
  286. bcdMax = 2.618 * err_max
  287. xadMin = 0.618 * err_min
  288. xadMax = 0.618 * err_max
  289. enable and
  290. isInRange(xabRatio, xabMin, xabMax) and
  291. isInRange(abcRatio, abcMin, abcMax) and
  292. isInRange(bcdRatio, bcdMin, bcdMax) and
  293. isInRange(xadRatio, xadMin, xadMax)
  294.  
  295. // @function isAntiButterflyPattern: Checks for harmonic pattern Anti Butterfly
  296. // @param xabRatio AB/XA
  297. // @param abcRatio BC/AB
  298. // @param bcdRatio CD/BC
  299. // @param xadRatio AD/XA
  300. // @param err_min Minumum error threshold
  301. // @param err_max Maximum error threshold
  302. // @returns True if the pattern is Anti Butterfly. False otherwise.
  303. isAntiButterflyPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  304. xabMin = 0.382 * err_min
  305. xabMax = 0.618 * err_max
  306. abcMin = 1.127 * err_min
  307. abcMax = 2.618 * err_max
  308. bcdMin = 1.272 * err_min
  309. bcdMax = 1.272 * err_max
  310. xadMin = 0.618
  311. xadMax = 0.786
  312. enable and
  313. isInRange(xabRatio, xabMin, xabMax) and
  314. isInRange(abcRatio, abcMin, abcMax) and
  315. isInRange(bcdRatio, bcdMin, bcdMax) and
  316. isInRange(xadRatio, xadMin, xadMax)
  317.  
  318. // @function isAntiBatPattern: Checks for harmonic pattern Anti Bat
  319. // @param xabRatio AB/XA
  320. // @param abcRatio BC/AB
  321. // @param bcdRatio CD/BC
  322. // @param xadRatio AD/XA
  323. // @param err_min Minumum error threshold
  324. // @param err_max Maximum error threshold
  325. // @returns True if the pattern is Anti Bat. False otherwise.
  326. export isAntiBatPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  327. xabMin = 0.382 * err_min
  328. xabMax = 0.618 * err_max
  329. abcMin = 1.128 * err_min
  330. abcMax = 2.618 * err_max
  331. bcdMin = 2.0 * err_min
  332. bcdMax = 2.618 * err_max
  333. xadMin = 1.128 * err_min
  334. xadMax = 1.128 * err_max
  335. enable and
  336. isInRange(xabRatio, xabMin, xabMax) and
  337. isInRange(abcRatio, abcMin, abcMax) and
  338. isInRange(bcdRatio, bcdMin, bcdMax) and
  339. isInRange(xadRatio, xadMin, xadMax)
  340.  
  341. // @function isAntiGartleyPattern: Checks for harmonic pattern Anti Gartley
  342. // @param xabRatio AB/XA
  343. // @param abcRatio BC/AB
  344. // @param bcdRatio CD/BC
  345. // @param xadRatio AD/XA
  346. // @param err_min Minumum error threshold
  347. // @param err_max Maximum error threshold
  348. // @returns True if the pattern is Anti Gartley. False otherwise.
  349. export isAntiGartleyPattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  350. xabMin = 0.618 * err_min
  351. xabMax = 0.786 * err_max
  352. abcMin = 1.127 * err_min
  353. abcMax = 2.618 * err_max
  354. bcdMin = 1.168 * err_min
  355. bcdMax = 1.618 * err_max
  356. xadMin = 1.272
  357. xadMax = 1.618
  358. enable and
  359. isInRange(xabRatio, xabMin, xabMax) and
  360. isInRange(abcRatio, abcMin, abcMax) and
  361. isInRange(bcdRatio, bcdMin, bcdMax) and
  362. isInRange(xadRatio, xadMin, xadMax)
  363.  
  364. // @function isNavarro200Pattern: Checks for harmonic pattern Navarro200
  365. // @param xabRatio AB/XA
  366. // @param abcRatio BC/AB
  367. // @param bcdRatio CD/BC
  368. // @param xadRatio AD/XA
  369. // @param err_min Minumum error threshold
  370. // @param err_max Maximum error threshold
  371. // @returns True if the pattern is Navarro200. False otherwise.
  372. export isNavarro200Pattern(float xabRatio, float abcRatio, float bcdRatio, float xadRatio, float err_min=0.92, float err_max=1.08, bool enable=true) =>
  373. xabMin = 0.382 * err_min
  374. xabMax = 0.786 * err_max
  375. abcMin = 0.886 * err_min
  376. abcMax = 1.127 * err_max
  377. bcdMin = 0.886 * err_min
  378. bcdMax = 3.618 * err_max
  379. xadMin = 0.886
  380. xadMax = 1.127
  381. enable and
  382. isInRange(xabRatio, xabMin, xabMax) and
  383. isInRange(abcRatio, abcMin, abcMax) and
  384. isInRange(bcdRatio, bcdMin, bcdMax) and
  385. isInRange(xadRatio, xadMin, xadMax)
  386.  
  387.  
  388. // @function isHarmonicPattern: Checks for harmonic patterns
  389. // @param x X coordinate value
  390. // @param a A coordinate value
  391. // @param c B coordinate value
  392. // @param c C coordinate value
  393. // @param d D coordinate value
  394. // @param flags flags to check patterns. Send empty array to enable all
  395. // @param errorPercent Error threshold
  396. // @returns [patternArray, patternLabelArray] Array of boolean values which says whether valid pattern exist and array of corresponding pattern names
  397. export isHarmonicPattern(float x, float a, float b, float c, float d,
  398. simple bool[] flags, simple int errorPercent = 8)=>
  399.  
  400. ignoreFlags = array.size(flags) == 0
  401. err_min = (100 - errorPercent) / 100
  402. err_max = (100 + errorPercent) / 100
  403.  
  404. xabRatio = math.abs(b - a) / math.abs(x - a)
  405. abcRatio = math.abs(c - b) / math.abs(a - b)
  406. bcdRatio = math.abs(d - c) / math.abs(b - c)
  407. xadRatio = math.abs(d - a) / math.abs(x - a)
  408. axcRatio = math.abs(c - x) / math.abs(a - x)
  409. xcdRatio = math.abs(c - d) / math.abs(x - c)
  410.  
  411. patternArray = array.new_bool()
  412. patternLabelArray = array.new_string()
  413. array.push(patternArray, isGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 0)))
  414. array.push(patternArray, isCrabPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 1)))
  415. array.push(patternArray, isDeepCrabPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 2)))
  416. array.push(patternArray, isBatPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 3)))
  417. array.push(patternArray, isButterflyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 4)))
  418. array.push(patternArray, isSharkPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 5)))
  419. array.push(patternArray, isCypherPattern(xabRatio, axcRatio, xcdRatio, err_min, err_max, ignoreFlags or array.get(flags, 6)))
  420. array.push(patternArray, isNenStarPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 7)))
  421.  
  422. array.push(patternArray, isAntiNenStarPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 8)))
  423. array.push(patternArray, isAntiSharkPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 9)))
  424. array.push(patternArray, isAntiCypherPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 10)))
  425. array.push(patternArray, isAntiCrabPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 11)))
  426. array.push(patternArray, isAntiButterflyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 12)))
  427. array.push(patternArray, isAntiBatPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 13)))
  428. array.push(patternArray, isAntiGartleyPattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 14)))
  429. array.push(patternArray, isNavarro200Pattern(xabRatio, abcRatio, bcdRatio, xadRatio, err_min, err_max, ignoreFlags or array.get(flags, 15)))
  430.  
  431. array.push(patternLabelArray, "Gartley")
  432. array.push(patternLabelArray, "Crab")
  433. array.push(patternLabelArray, "DeepCrab")
  434. array.push(patternLabelArray, "Bat")
  435. array.push(patternLabelArray, "Butterfly")
  436. array.push(patternLabelArray, "Shark")
  437. array.push(patternLabelArray, "Cypher")
  438. array.push(patternLabelArray, "NenStar")
  439.  
  440. array.push(patternLabelArray, "Anti NenStar")
  441. array.push(patternLabelArray, "Anti Shark")
  442. array.push(patternLabelArray, "Anti Cypher")
  443. array.push(patternLabelArray, "Anti Crab")
  444. array.push(patternLabelArray, "Anti Butterfly")
  445. array.push(patternLabelArray, "Anti Bat")
  446. array.push(patternLabelArray, "Anti Gartley")
  447. array.push(patternLabelArray, "Navarro200")
  448. [patternArray, patternLabelArray]
  449.  
Advertisement
Add Comment
Please, Sign In to add comment