xmd79

Gann Square of 9

Jan 4th, 2023
150
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 28.68 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. // © Mr_Amiiin_n
  3.  
  4. //@version=5
  5. indicator('Gann Square', overlay=true)
  6.  
  7. //set background color
  8. bg = color(#536895)
  9. bg1 = color(#7C869E)
  10.  
  11. //gann square 19*19
  12. var table t = table.new(position.top_right, 19, 19, frame_color=color.rgb(255, 230, 204), frame_width=1, border_color=color.rgb(255, 230, 204), border_width=1)
  13.  
  14. //c0
  15. table.cell(t, 0, 0, str.tostring(307), text_color=color.white, bgcolor=bg)
  16. table.cell(t, 1, 0, str.tostring(308), text_color=color.white)
  17. table.cell(t, 2, 0, str.tostring(309), text_color=color.white)
  18. table.cell(t, 3, 0, str.tostring(310), text_color=color.white)
  19. table.cell(t, 4, 0, str.tostring(311), text_color=color.white)
  20. table.cell(t, 5, 0, str.tostring(312), text_color=color.white)
  21. table.cell(t, 6, 0, str.tostring(313), text_color=color.white)
  22. table.cell(t, 7, 0, str.tostring(314), text_color=color.white)
  23. table.cell(t, 8, 0, str.tostring(315), text_color=color.white)
  24. table.cell(t, 9, 0, str.tostring(316), text_color=color.white, bgcolor=bg)
  25. table.cell(t, 10, 0, str.tostring(317), text_color=color.white)
  26. table.cell(t, 11, 0, str.tostring(318), text_color=color.white)
  27. table.cell(t, 12, 0, str.tostring(319), text_color=color.white)
  28. table.cell(t, 13, 0, str.tostring(320), text_color=color.white)
  29. table.cell(t, 14, 0, str.tostring(321), text_color=color.white)
  30. table.cell(t, 15, 0, str.tostring(322), text_color=color.white)
  31. table.cell(t, 16, 0, str.tostring(323), text_color=color.white)
  32. table.cell(t, 17, 0, str.tostring(324), text_color=color.white)
  33. table.cell(t, 18, 0, str.tostring(325), text_color=color.white, bgcolor=bg)
  34.  
  35. //c1
  36. table.cell(t, 0, 1, str.tostring(306), text_color=color.white)
  37. table.cell(t, 1, 1, str.tostring(241), text_color=color.white, bgcolor=bg)
  38. table.cell(t, 2, 1, str.tostring(242), text_color=color.white)
  39. table.cell(t, 3, 1, str.tostring(243), text_color=color.white)
  40. table.cell(t, 4, 1, str.tostring(244), text_color=color.white)
  41. table.cell(t, 5, 1, str.tostring(245), text_color=color.white)
  42. table.cell(t, 6, 1, str.tostring(246), text_color=color.white)
  43. table.cell(t, 7, 1, str.tostring(247), text_color=color.white)
  44. table.cell(t, 8, 1, str.tostring(248), text_color=color.white)
  45. table.cell(t, 9, 1, str.tostring(249), text_color=color.white, bgcolor=bg)
  46. table.cell(t, 10, 1, str.tostring(250), text_color=color.white)
  47. table.cell(t, 11, 1, str.tostring(251), text_color=color.white)
  48. table.cell(t, 12, 1, str.tostring(252), text_color=color.white)
  49. table.cell(t, 13, 1, str.tostring(253), text_color=color.white)
  50. table.cell(t, 14, 1, str.tostring(254), text_color=color.white)
  51. table.cell(t, 15, 1, str.tostring(255), text_color=color.white)
  52. table.cell(t, 16, 1, str.tostring(256), text_color=color.white)
  53. table.cell(t, 17, 1, str.tostring(257), text_color=color.white, bgcolor=bg)
  54. table.cell(t, 18, 1, str.tostring(326), text_color=color.white)
  55.  
  56. //c2
  57. table.cell(t, 0, 2, str.tostring(305), text_color=color.white)
  58. table.cell(t, 1, 2, str.tostring(240), text_color=color.white)
  59. table.cell(t, 2, 2, str.tostring(183), text_color=color.white, bgcolor=bg)
  60. table.cell(t, 3, 2, str.tostring(184), text_color=color.white)
  61. table.cell(t, 4, 2, str.tostring(185), text_color=color.white)
  62. table.cell(t, 5, 2, str.tostring(186), text_color=color.white)
  63. table.cell(t, 6, 2, str.tostring(187), text_color=color.white)
  64. table.cell(t, 7, 2, str.tostring(188), text_color=color.white)
  65. table.cell(t, 8, 2, str.tostring(189), text_color=color.white)
  66. table.cell(t, 9, 2, str.tostring(190), text_color=color.white, bgcolor=bg)
  67. table.cell(t, 10, 2, str.tostring(191), text_color=color.white)
  68. table.cell(t, 11, 2, str.tostring(192), text_color=color.white)
  69. table.cell(t, 12, 2, str.tostring(193), text_color=color.white)
  70. table.cell(t, 13, 2, str.tostring(194), text_color=color.white)
  71. table.cell(t, 14, 2, str.tostring(195), text_color=color.white)
  72. table.cell(t, 15, 2, str.tostring(196), text_color=color.white)
  73. table.cell(t, 16, 2, str.tostring(197), text_color=color.white, bgcolor=bg)
  74. table.cell(t, 17, 2, str.tostring(258), text_color=color.white)
  75. table.cell(t, 18, 2, str.tostring(327), text_color=color.white)
  76.  
  77. //c3
  78. table.cell(t, 0, 3, str.tostring(304), text_color=color.white)
  79. table.cell(t, 1, 3, str.tostring(239), text_color=color.white)
  80. table.cell(t, 2, 3, str.tostring(182), text_color=color.white)
  81. table.cell(t, 3, 3, str.tostring(133), text_color=color.white, bgcolor=bg)
  82. table.cell(t, 4, 3, str.tostring(134), text_color=color.white)
  83. table.cell(t, 5, 3, str.tostring(135), text_color=color.white)
  84. table.cell(t, 6, 3, str.tostring(136), text_color=color.white)
  85. table.cell(t, 7, 3, str.tostring(137), text_color=color.white)
  86. table.cell(t, 8, 3, str.tostring(138), text_color=color.white)
  87. table.cell(t, 9, 3, str.tostring(139), text_color=color.white, bgcolor=bg)
  88. table.cell(t, 10, 3, str.tostring(140), text_color=color.white)
  89. table.cell(t, 11, 3, str.tostring(141), text_color=color.white)
  90. table.cell(t, 12, 3, str.tostring(142), text_color=color.white)
  91. table.cell(t, 13, 3, str.tostring(143), text_color=color.white)
  92. table.cell(t, 14, 3, str.tostring(144), text_color=color.white)
  93. table.cell(t, 15, 3, str.tostring(145), text_color=color.white, bgcolor=bg)
  94. table.cell(t, 16, 3, str.tostring(198), text_color=color.white)
  95. table.cell(t, 17, 3, str.tostring(259), text_color=color.white)
  96. table.cell(t, 18, 3, str.tostring(328), text_color=color.white)
  97.  
  98. //c4
  99. table.cell(t, 0, 4, str.tostring(303), text_color=color.white)
  100. table.cell(t, 1, 4, str.tostring(238), text_color=color.white)
  101. table.cell(t, 2, 4, str.tostring(181), text_color=color.white)
  102. table.cell(t, 3, 4, str.tostring(132), text_color=color.white)
  103. table.cell(t, 4, 4, str.tostring(91), text_color=color.white, bgcolor=bg)
  104. table.cell(t, 5, 4, str.tostring(92), text_color=color.white)
  105. table.cell(t, 6, 4, str.tostring(93), text_color=color.white)
  106. table.cell(t, 7, 4, str.tostring(94), text_color=color.white)
  107. table.cell(t, 8, 4, str.tostring(95), text_color=color.white)
  108. table.cell(t, 9, 4, str.tostring(96), text_color=color.white, bgcolor=bg)
  109. table.cell(t, 10, 4, str.tostring(97), text_color=color.white)
  110. table.cell(t, 11, 4, str.tostring(98), text_color=color.white)
  111. table.cell(t, 12, 4, str.tostring(99), text_color=color.white)
  112. table.cell(t, 13, 4, str.tostring(100), text_color=color.white)
  113. table.cell(t, 14, 4, str.tostring(101), text_color=color.white, bgcolor=bg)
  114. table.cell(t, 15, 4, str.tostring(146), text_color=color.white)
  115. table.cell(t, 16, 4, str.tostring(199), text_color=color.white)
  116. table.cell(t, 17, 4, str.tostring(260), text_color=color.white)
  117. table.cell(t, 18, 4, str.tostring(329), text_color=color.white)
  118.  
  119. //c5
  120. table.cell(t, 0, 5, str.tostring(302), text_color=color.white)
  121. table.cell(t, 1, 5, str.tostring(237), text_color=color.white)
  122. table.cell(t, 2, 5, str.tostring(180), text_color=color.white)
  123. table.cell(t, 3, 5, str.tostring(131), text_color=color.white)
  124. table.cell(t, 4, 5, str.tostring(90), text_color=color.white)
  125. table.cell(t, 5, 5, str.tostring(57), text_color=color.white, bgcolor=bg)
  126. table.cell(t, 6, 5, str.tostring(58), text_color=color.white)
  127. table.cell(t, 7, 5, str.tostring(59), text_color=color.white)
  128. table.cell(t, 8, 5, str.tostring(60), text_color=color.white)
  129. table.cell(t, 9, 5, str.tostring(61), text_color=color.white, bgcolor=bg)
  130. table.cell(t, 10, 5, str.tostring(62), text_color=color.white)
  131. table.cell(t, 11, 5, str.tostring(63), text_color=color.white)
  132. table.cell(t, 12, 5, str.tostring(64), text_color=color.white)
  133. table.cell(t, 13, 5, str.tostring(65), text_color=color.white, bgcolor=bg)
  134. table.cell(t, 14, 5, str.tostring(102), text_color=color.white)
  135. table.cell(t, 15, 5, str.tostring(147), text_color=color.white)
  136. table.cell(t, 16, 5, str.tostring(200), text_color=color.white)
  137. table.cell(t, 17, 5, str.tostring(261), text_color=color.white)
  138. table.cell(t, 18, 5, str.tostring(330), text_color=color.white)
  139.  
  140. //c6
  141. table.cell(t, 0, 6, str.tostring(301), text_color=color.white)
  142. table.cell(t, 1, 6, str.tostring(236), text_color=color.white)
  143. table.cell(t, 2, 6, str.tostring(179), text_color=color.white)
  144. table.cell(t, 3, 6, str.tostring(130), text_color=color.white)
  145. table.cell(t, 4, 6, str.tostring(89), text_color=color.white)
  146. table.cell(t, 5, 6, str.tostring(56), text_color=color.white)
  147. table.cell(t, 6, 6, str.tostring(31), text_color=color.white, bgcolor=bg)
  148. table.cell(t, 7, 6, str.tostring(32), text_color=color.white)
  149. table.cell(t, 8, 6, str.tostring(33), text_color=color.white)
  150. table.cell(t, 9, 6, str.tostring(34), text_color=color.white, bgcolor=bg)
  151. table.cell(t, 10, 6, str.tostring(35), text_color=color.white)
  152. table.cell(t, 11, 6, str.tostring(36), text_color=color.white)
  153. table.cell(t, 12, 6, str.tostring(37), text_color=color.white, bgcolor=bg)
  154. table.cell(t, 13, 6, str.tostring(66), text_color=color.white)
  155. table.cell(t, 14, 6, str.tostring(103), text_color=color.white)
  156. table.cell(t, 15, 6, str.tostring(148), text_color=color.white)
  157. table.cell(t, 16, 6, str.tostring(201), text_color=color.white)
  158. table.cell(t, 17, 6, str.tostring(262), text_color=color.white)
  159. table.cell(t, 18, 6, str.tostring(331), text_color=color.white)
  160.  
  161.  
  162. //c7
  163. table.cell(t, 0, 7, str.tostring(300), text_color=color.white)
  164. table.cell(t, 1, 7, str.tostring(235), text_color=color.white)
  165. table.cell(t, 2, 7, str.tostring(178), text_color=color.white)
  166. table.cell(t, 3, 7, str.tostring(129), text_color=color.white)
  167. table.cell(t, 4, 7, str.tostring(88), text_color=color.white)
  168. table.cell(t, 5, 7, str.tostring(55), text_color=color.white)
  169. table.cell(t, 6, 7, str.tostring(30), text_color=color.white)
  170. table.cell(t, 7, 7, str.tostring(13), text_color=color.white, bgcolor=bg)
  171. table.cell(t, 8, 7, str.tostring(14), text_color=color.white)
  172. table.cell(t, 9, 7, str.tostring(15), text_color=color.white, bgcolor=bg)
  173. table.cell(t, 10, 7, str.tostring(16), text_color=color.white)
  174. table.cell(t, 11, 7, str.tostring(17), text_color=color.white, bgcolor=bg)
  175. table.cell(t, 12, 7, str.tostring(38), text_color=color.white)
  176. table.cell(t, 13, 7, str.tostring(67), text_color=color.white)
  177. table.cell(t, 14, 7, str.tostring(104), text_color=color.white)
  178. table.cell(t, 15, 7, str.tostring(149), text_color=color.white)
  179. table.cell(t, 16, 7, str.tostring(202), text_color=color.white)
  180. table.cell(t, 17, 7, str.tostring(263), text_color=color.white)
  181. table.cell(t, 18, 7, str.tostring(332), text_color=color.white)
  182.  
  183. //c8
  184. table.cell(t, 0, 8, str.tostring(299), text_color=color.white)
  185. table.cell(t, 1, 8, str.tostring(234), text_color=color.white)
  186. table.cell(t, 2, 8, str.tostring(177), text_color=color.white)
  187. table.cell(t, 3, 8, str.tostring(128), text_color=color.white)
  188. table.cell(t, 4, 8, str.tostring(87), text_color=color.white)
  189. table.cell(t, 5, 8, str.tostring(54), text_color=color.white)
  190. table.cell(t, 6, 8, str.tostring(29), text_color=color.white)
  191. table.cell(t, 7, 8, str.tostring(12), text_color=color.white)
  192. table.cell(t, 8, 8, str.tostring(3), text_color=color.white, bgcolor=bg)
  193. table.cell(t, 9, 8, str.tostring(4), text_color=color.white, bgcolor=bg)
  194. table.cell(t, 10, 8, str.tostring(5), text_color=color.white, bgcolor=bg)
  195. table.cell(t, 11, 8, str.tostring(18), text_color=color.white)
  196. table.cell(t, 12, 8, str.tostring(39), text_color=color.white)
  197. table.cell(t, 13, 8, str.tostring(68), text_color=color.white)
  198. table.cell(t, 14, 8, str.tostring(105), text_color=color.white)
  199. table.cell(t, 15, 8, str.tostring(150), text_color=color.white)
  200. table.cell(t, 16, 8, str.tostring(203), text_color=color.white)
  201. table.cell(t, 17, 8, str.tostring(264), text_color=color.white)
  202. table.cell(t, 18, 8, str.tostring(333), text_color=color.white)
  203.  
  204. //c9
  205. table.cell(t, 0, 9, str.tostring(298), text_color=color.white, bgcolor=bg)
  206. table.cell(t, 1, 9, str.tostring(233), text_color=color.white, bgcolor=bg)
  207. table.cell(t, 2, 9, str.tostring(176), text_color=color.white, bgcolor=bg)
  208. table.cell(t, 3, 9, str.tostring(127), text_color=color.white, bgcolor=bg)
  209. table.cell(t, 4, 9, str.tostring(86), text_color=color.white, bgcolor=bg)
  210. table.cell(t, 5, 9, str.tostring(53), text_color=color.white, bgcolor=bg)
  211. table.cell(t, 6, 9, str.tostring(28), text_color=color.white, bgcolor=bg)
  212. table.cell(t, 7, 9, str.tostring(11), text_color=color.white, bgcolor=bg)
  213. table.cell(t, 8, 9, str.tostring(2), text_color=color.white, bgcolor=bg)
  214. table.cell(t, 9, 9, str.tostring(1), text_color=color.white, bgcolor=bg1) //core of sqaure=1
  215. table.cell(t, 10, 9, str.tostring(6), text_color=color.white, bgcolor=bg)
  216. table.cell(t, 11, 9, str.tostring(19), text_color=color.white, bgcolor=bg)
  217. table.cell(t, 12, 9, str.tostring(40), text_color=color.white, bgcolor=bg)
  218. table.cell(t, 13, 9, str.tostring(69), text_color=color.white, bgcolor=bg)
  219. table.cell(t, 14, 9, str.tostring(106), text_color=color.white, bgcolor=bg)
  220. table.cell(t, 15, 9, str.tostring(151), text_color=color.white, bgcolor=bg)
  221. table.cell(t, 16, 9, str.tostring(204), text_color=color.white, bgcolor=bg)
  222. table.cell(t, 17, 9, str.tostring(265), text_color=color.white, bgcolor=bg)
  223. table.cell(t, 18, 9, str.tostring(334), text_color=color.white, bgcolor=bg)
  224.  
  225. //c10
  226. table.cell(t, 0, 10, str.tostring(297), text_color=color.white)
  227. table.cell(t, 1, 10, str.tostring(232), text_color=color.white)
  228. table.cell(t, 2, 10, str.tostring(175), text_color=color.white)
  229. table.cell(t, 3, 10, str.tostring(126), text_color=color.white)
  230. table.cell(t, 4, 10, str.tostring(85), text_color=color.white)
  231. table.cell(t, 5, 10, str.tostring(52), text_color=color.white)
  232. table.cell(t, 6, 10, str.tostring(27), text_color=color.white)
  233. table.cell(t, 7, 10, str.tostring(10), text_color=color.white)
  234. table.cell(t, 8, 10, str.tostring(9), text_color=color.white, bgcolor=bg)
  235. table.cell(t, 9, 10, str.tostring(8), text_color=color.white, bgcolor=bg)
  236. table.cell(t, 10, 10, str.tostring(7), text_color=color.white, bgcolor=bg)
  237. table.cell(t, 11, 10, str.tostring(20), text_color=color.white)
  238. table.cell(t, 12, 10, str.tostring(41), text_color=color.white)
  239. table.cell(t, 13, 10, str.tostring(70), text_color=color.white)
  240. table.cell(t, 14, 10, str.tostring(107), text_color=color.white)
  241. table.cell(t, 15, 10, str.tostring(152), text_color=color.white)
  242. table.cell(t, 16, 10, str.tostring(205), text_color=color.white)
  243. table.cell(t, 17, 10, str.tostring(266), text_color=color.white)
  244. table.cell(t, 18, 10, str.tostring(335), text_color=color.white)
  245.  
  246.  
  247. //c11
  248. table.cell(t, 0, 11, str.tostring(296), text_color=color.white)
  249. table.cell(t, 1, 11, str.tostring(231), text_color=color.white)
  250. table.cell(t, 2, 11, str.tostring(174), text_color=color.white)
  251. table.cell(t, 3, 11, str.tostring(125), text_color=color.white)
  252. table.cell(t, 4, 11, str.tostring(84), text_color=color.white)
  253. table.cell(t, 5, 11, str.tostring(51), text_color=color.white)
  254. table.cell(t, 6, 11, str.tostring(26), text_color=color.white)
  255. table.cell(t, 7, 11, str.tostring(25), text_color=color.white, bgcolor=bg)
  256. table.cell(t, 8, 11, str.tostring(24), text_color=color.white)
  257. table.cell(t, 9, 11, str.tostring(23), text_color=color.white, bgcolor=bg)
  258. table.cell(t, 10, 11, str.tostring(22), text_color=color.white)
  259. table.cell(t, 11, 11, str.tostring(21), text_color=color.white, bgcolor=bg)
  260. table.cell(t, 12, 11, str.tostring(42), text_color=color.white)
  261. table.cell(t, 13, 11, str.tostring(71), text_color=color.white)
  262. table.cell(t, 14, 11, str.tostring(108), text_color=color.white)
  263. table.cell(t, 15, 11, str.tostring(153), text_color=color.white)
  264. table.cell(t, 16, 11, str.tostring(206), text_color=color.white)
  265. table.cell(t, 17, 11, str.tostring(267), text_color=color.white)
  266. table.cell(t, 18, 11, str.tostring(336), text_color=color.white)
  267.  
  268.  
  269. //c12
  270. table.cell(t, 0, 12, str.tostring(295), text_color=color.white)
  271. table.cell(t, 1, 12, str.tostring(230), text_color=color.white)
  272. table.cell(t, 2, 12, str.tostring(173), text_color=color.white)
  273. table.cell(t, 3, 12, str.tostring(124), text_color=color.white)
  274. table.cell(t, 4, 12, str.tostring(83), text_color=color.white)
  275. table.cell(t, 5, 12, str.tostring(50), text_color=color.white)
  276. table.cell(t, 6, 12, str.tostring(49), text_color=color.white, bgcolor=bg)
  277. table.cell(t, 7, 12, str.tostring(48), text_color=color.white)
  278. table.cell(t, 8, 12, str.tostring(47), text_color=color.white)
  279. table.cell(t, 9, 12, str.tostring(46), text_color=color.white, bgcolor=bg)
  280. table.cell(t, 10, 12, str.tostring(45), text_color=color.white)
  281. table.cell(t, 11, 12, str.tostring(44), text_color=color.white)
  282. table.cell(t, 12, 12, str.tostring(43), text_color=color.white, bgcolor=bg)
  283. table.cell(t, 13, 12, str.tostring(72), text_color=color.white)
  284. table.cell(t, 14, 12, str.tostring(109), text_color=color.white)
  285. table.cell(t, 15, 12, str.tostring(154), text_color=color.white)
  286. table.cell(t, 16, 12, str.tostring(207), text_color=color.white)
  287. table.cell(t, 17, 12, str.tostring(268), text_color=color.white)
  288. table.cell(t, 18, 12, str.tostring(337), text_color=color.white)
  289.  
  290.  
  291. //c13
  292. table.cell(t, 0, 13, str.tostring(294), text_color=color.white)
  293. table.cell(t, 1, 13, str.tostring(229), text_color=color.white)
  294. table.cell(t, 2, 13, str.tostring(172), text_color=color.white)
  295. table.cell(t, 3, 13, str.tostring(123), text_color=color.white)
  296. table.cell(t, 4, 13, str.tostring(82), text_color=color.white)
  297. table.cell(t, 5, 13, str.tostring(81), text_color=color.white, bgcolor=bg)
  298. table.cell(t, 6, 13, str.tostring(80), text_color=color.white)
  299. table.cell(t, 7, 13, str.tostring(79), text_color=color.white)
  300. table.cell(t, 8, 13, str.tostring(78), text_color=color.white)
  301. table.cell(t, 9, 13, str.tostring(77), text_color=color.white, bgcolor=bg)
  302. table.cell(t, 10, 13, str.tostring(76), text_color=color.white)
  303. table.cell(t, 11, 13, str.tostring(75), text_color=color.white)
  304. table.cell(t, 12, 13, str.tostring(74), text_color=color.white)
  305. table.cell(t, 13, 13, str.tostring(73), text_color=color.white, bgcolor=bg)
  306. table.cell(t, 14, 13, str.tostring(110), text_color=color.white)
  307. table.cell(t, 15, 13, str.tostring(155), text_color=color.white)
  308. table.cell(t, 16, 13, str.tostring(208), text_color=color.white)
  309. table.cell(t, 17, 13, str.tostring(269), text_color=color.white)
  310. table.cell(t, 18, 13, str.tostring(338), text_color=color.white)
  311.  
  312.  
  313. //c14
  314. table.cell(t, 0, 14, str.tostring(293), text_color=color.white)
  315. table.cell(t, 1, 14, str.tostring(228), text_color=color.white)
  316. table.cell(t, 2, 14, str.tostring(171), text_color=color.white)
  317. table.cell(t, 3, 14, str.tostring(122), text_color=color.white)
  318. table.cell(t, 4, 14, str.tostring(121), text_color=color.white, bgcolor=bg)
  319. table.cell(t, 5, 14, str.tostring(120), text_color=color.white)
  320. table.cell(t, 6, 14, str.tostring(119), text_color=color.white)
  321. table.cell(t, 7, 14, str.tostring(118), text_color=color.white)
  322. table.cell(t, 8, 14, str.tostring(117), text_color=color.white)
  323. table.cell(t, 9, 14, str.tostring(116), text_color=color.white, bgcolor=bg)
  324. table.cell(t, 10, 14, str.tostring(115), text_color=color.white)
  325. table.cell(t, 11, 14, str.tostring(114), text_color=color.white)
  326. table.cell(t, 12, 14, str.tostring(113), text_color=color.white)
  327. table.cell(t, 13, 14, str.tostring(112), text_color=color.white)
  328. table.cell(t, 14, 14, str.tostring(111), text_color=color.white, bgcolor=bg)
  329. table.cell(t, 15, 14, str.tostring(156), text_color=color.white)
  330. table.cell(t, 16, 14, str.tostring(209), text_color=color.white)
  331. table.cell(t, 17, 14, str.tostring(270), text_color=color.white)
  332. table.cell(t, 18, 14, str.tostring(339), text_color=color.white)
  333.  
  334.  
  335. //c15
  336. table.cell(t, 0, 15, str.tostring(292), text_color=color.white)
  337. table.cell(t, 1, 15, str.tostring(227), text_color=color.white)
  338. table.cell(t, 2, 15, str.tostring(170), text_color=color.white)
  339. table.cell(t, 3, 15, str.tostring(169), text_color=color.white, bgcolor=bg)
  340. table.cell(t, 4, 15, str.tostring(168), text_color=color.white)
  341. table.cell(t, 5, 15, str.tostring(167), text_color=color.white)
  342. table.cell(t, 6, 15, str.tostring(166), text_color=color.white)
  343. table.cell(t, 7, 15, str.tostring(165), text_color=color.white)
  344. table.cell(t, 8, 15, str.tostring(164), text_color=color.white)
  345. table.cell(t, 9, 15, str.tostring(163), text_color=color.white, bgcolor=bg)
  346. table.cell(t, 10, 15, str.tostring(162), text_color=color.white)
  347. table.cell(t, 11, 15, str.tostring(161), text_color=color.white)
  348. table.cell(t, 12, 15, str.tostring(160), text_color=color.white)
  349. table.cell(t, 13, 15, str.tostring(159), text_color=color.white)
  350. table.cell(t, 14, 15, str.tostring(158), text_color=color.white)
  351. table.cell(t, 15, 15, str.tostring(157), text_color=color.white, bgcolor=bg)
  352. table.cell(t, 16, 15, str.tostring(210), text_color=color.white)
  353. table.cell(t, 17, 15, str.tostring(271), text_color=color.white)
  354. table.cell(t, 18, 15, str.tostring(340), text_color=color.white)
  355.  
  356.  
  357. //c16
  358. table.cell(t, 0, 16, str.tostring(291), text_color=color.white)
  359. table.cell(t, 1, 16, str.tostring(226), text_color=color.white)
  360. table.cell(t, 2, 16, str.tostring(225), text_color=color.white, bgcolor=bg)
  361. table.cell(t, 3, 16, str.tostring(224), text_color=color.white)
  362. table.cell(t, 4, 16, str.tostring(223), text_color=color.white)
  363. table.cell(t, 5, 16, str.tostring(222), text_color=color.white)
  364. table.cell(t, 6, 16, str.tostring(221), text_color=color.white)
  365. table.cell(t, 7, 16, str.tostring(220), text_color=color.white)
  366. table.cell(t, 8, 16, str.tostring(219), text_color=color.white)
  367. table.cell(t, 9, 16, str.tostring(218), text_color=color.white, bgcolor=bg)
  368. table.cell(t, 10, 16, str.tostring(217), text_color=color.white)
  369. table.cell(t, 11, 16, str.tostring(216), text_color=color.white)
  370. table.cell(t, 12, 16, str.tostring(215), text_color=color.white)
  371. table.cell(t, 13, 16, str.tostring(214), text_color=color.white)
  372. table.cell(t, 14, 16, str.tostring(213), text_color=color.white)
  373. table.cell(t, 15, 16, str.tostring(212), text_color=color.white)
  374. table.cell(t, 16, 16, str.tostring(211), text_color=color.white, bgcolor=bg)
  375. table.cell(t, 17, 16, str.tostring(272), text_color=color.white)
  376. table.cell(t, 18, 16, str.tostring(341), text_color=color.white)
  377.  
  378.  
  379. //c17
  380. table.cell(t, 0, 17, str.tostring(290), text_color=color.white)
  381. table.cell(t, 1, 17, str.tostring(289), text_color=color.white, bgcolor=bg)
  382. table.cell(t, 2, 17, str.tostring(288), text_color=color.white)
  383. table.cell(t, 3, 17, str.tostring(287), text_color=color.white)
  384. table.cell(t, 4, 17, str.tostring(286), text_color=color.white)
  385. table.cell(t, 5, 17, str.tostring(285), text_color=color.white)
  386. table.cell(t, 6, 17, str.tostring(284), text_color=color.white)
  387. table.cell(t, 7, 17, str.tostring(283), text_color=color.white)
  388. table.cell(t, 8, 17, str.tostring(282), text_color=color.white)
  389. table.cell(t, 9, 17, str.tostring(281), text_color=color.white, bgcolor=bg)
  390. table.cell(t, 10, 17, str.tostring(280), text_color=color.white)
  391. table.cell(t, 11, 17, str.tostring(279), text_color=color.white)
  392. table.cell(t, 12, 17, str.tostring(278), text_color=color.white)
  393. table.cell(t, 13, 17, str.tostring(277), text_color=color.white)
  394. table.cell(t, 14, 17, str.tostring(276), text_color=color.white)
  395. table.cell(t, 15, 17, str.tostring(275), text_color=color.white)
  396. table.cell(t, 16, 17, str.tostring(274), text_color=color.white)
  397. table.cell(t, 17, 17, str.tostring(273), text_color=color.white, bgcolor=bg)
  398. table.cell(t, 18, 17, str.tostring(342), text_color=color.white)
  399.  
  400.  
  401. //c18
  402. table.cell(t, 0, 18, str.tostring(361), text_color=color.white, bgcolor=bg)
  403. table.cell(t, 1, 18, str.tostring(360), text_color=color.white)
  404. table.cell(t, 2, 18, str.tostring(359), text_color=color.white)
  405. table.cell(t, 3, 18, str.tostring(358), text_color=color.white)
  406. table.cell(t, 4, 18, str.tostring(357), text_color=color.white)
  407. table.cell(t, 5, 18, str.tostring(356), text_color=color.white)
  408. table.cell(t, 6, 18, str.tostring(355), text_color=color.white)
  409. table.cell(t, 7, 18, str.tostring(354), text_color=color.white)
  410. table.cell(t, 8, 18, str.tostring(353), text_color=color.white)
  411. table.cell(t, 9, 18, str.tostring(352), text_color=color.white, bgcolor=bg)
  412. table.cell(t, 10, 18, str.tostring(351), text_color=color.white)
  413. table.cell(t, 11, 18, str.tostring(350), text_color=color.white)
  414. table.cell(t, 12, 18, str.tostring(349), text_color=color.white)
  415. table.cell(t, 13, 18, str.tostring(348), text_color=color.white)
  416. table.cell(t, 14, 18, str.tostring(347), text_color=color.white)
  417. table.cell(t, 15, 18, str.tostring(346), text_color=color.white)
  418. table.cell(t, 16, 18, str.tostring(345), text_color=color.white)
  419. table.cell(t, 17, 18, str.tostring(344), text_color=color.white)
  420. table.cell(t, 18, 18, str.tostring(343), text_color=color.white, bgcolor=bg)
  421.  
  422. //get date info
  423. lastDate = input.time(title='Date : ', defval=timestamp('1 sep 2022'), tooltip='Last HH or LL Date ')
  424.  
  425. //get numbers
  426. firstPivot = input.int(title='Num 1 : ', defval=0, tooltip='First number to show future pivot', group="Numbers")
  427. SecondPivot = input.int(title='Num 2 : ', defval=0, tooltip='Second number to show future pivot', group="Numbers")
  428. ThirdPivot = input.int(title='Num 3 : ', defval=0, tooltip='Third number to show future pivot', group="Numbers")
  429. fourthPivot = input.int(title='Num 4 : ', defval=0, tooltip='Fourth number to show future pivot', group="Numbers")
  430. fifthPivot = input.int(title='Num 5 : ', defval=0, tooltip='Fifth number to show future pivot', group="Numbers")
  431. sixthPivot = input.int(title='Num 6 : ', defval=0, tooltip='sixth number to show future pivot', group="Numbers")
  432. seventhPivot = input.int(title='Num 7 : ', defval=0, tooltip='seventh number to show future pivot', group="Numbers")
  433.  
  434. //get labels color
  435. firstColor = input.color(title='Num 1 Color: ', defval=color.blue, tooltip='First number color label', group="Colors")
  436. secondColor = input.color(title='Num 2 Color: ', defval=color.blue, tooltip='Second number color label', group="Colors")
  437. thirdColor = input.color(title='Num 3 Color: ', defval=color.blue, tooltip='Third number color label', group="Colors")
  438. fourthColor = input.color(title='Num 4 Color: ', defval=color.blue, tooltip='Fourth number color label', group="Colors")
  439. fifthColor = input.color(title='Num 5 Color: ', defval=color.blue, tooltip='Fifth number color label', group="Colors")
  440. sixthColor = input.color(title='Num 6 Color: ', defval=color.blue, tooltip='sixth number color label', group="Colors")
  441. seventhColor = input.color(title='Num 7 Color: ', defval=color.blue, tooltip='seventh number color label', group="Colors")
  442.  
  443.  
  444.  
  445. if firstPivot != 0
  446. d1 = line.new(lastDate + firstPivot * 86400000, high, lastDate + firstPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  447. l1 = label.new(lastDate + firstPivot * 86400000, low, str.tostring(firstPivot), xloc=xloc.bar_time, color=firstColor)
  448. label.delete(l1[1])
  449. line.delete(d1[1])
  450.  
  451. if SecondPivot != 0
  452. d2 = line.new(lastDate + SecondPivot * 86400000, high, lastDate + SecondPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  453. l2 = label.new(lastDate + SecondPivot * 86400000, low, str.tostring(SecondPivot), xloc=xloc.bar_time, color=secondColor)
  454. label.delete(l2[1])
  455. line.delete(d2[1])
  456.  
  457. if ThirdPivot != 0
  458. d3 = line.new(lastDate + ThirdPivot * 86400000, high, lastDate + ThirdPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  459. l3 = label.new(lastDate + ThirdPivot * 86400000, low, str.tostring(ThirdPivot), xloc=xloc.bar_time, color=thirdColor)
  460. label.delete(l3[1])
  461. line.delete(d3[1])
  462.  
  463. if fourthPivot != 0
  464. d4 = line.new(lastDate + fourthPivot * 86400000, high, lastDate + fourthPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  465. l4 = label.new(lastDate + fourthPivot * 86400000, low, str.tostring(fourthPivot), xloc=xloc.bar_time, color=fourthColor)
  466. label.delete(l4[1])
  467. line.delete(d4[1])
  468.  
  469. if fifthPivot != 0
  470. d5 = line.new(lastDate + fifthPivot * 86400000, high, lastDate + fifthPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  471. l5 = label.new(lastDate + fifthPivot * 86400000, low, str.tostring(fifthPivot), xloc=xloc.bar_time, color=fifthColor)
  472. label.delete(l5[1])
  473. line.delete(d5[1])
  474.  
  475. if sixthPivot != 0
  476. d6 = line.new(lastDate + sixthPivot * 86400000, high, lastDate + sixthPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  477. l6 = label.new(lastDate + sixthPivot * 86400000, low, str.tostring(sixthPivot), xloc=xloc.bar_time, color=sixthColor)
  478. label.delete(l6[1])
  479. line.delete(d6[1])
  480.  
  481. if seventhPivot != 0
  482. d7 = line.new(lastDate + seventhPivot * 86400000, high, lastDate + seventhPivot * 86400000, high - 1, xloc=xloc.bar_time, extend=extend.both, color=color.orange, style=line.style_dashed)
  483. l7 = label.new(lastDate + seventhPivot * 86400000, low, str.tostring(seventhPivot), xloc=xloc.bar_time, color=seventhColor)
  484. label.delete(l7[1])
  485. line.delete(d7[1])
  486.  
  487.  
Add Comment
Please, Sign In to add comment