xmd79

Fibonnaci by Luke

Mar 14th, 2023
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.31 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. // © bekirfinans
  3.  
  4. //@version=5
  5. indicator("Fibonnaci by Luke",overlay = true)
  6. Uzunluk = input(2,"Screen length")
  7. kapanis = close[1]
  8. kapanis2 = close[2]
  9. tepe = high[1]
  10. dip = low[1]
  11. kontrol = kapanis > kapanis2 ? true : false
  12. fib618 = kontrol == true ? tepe - ((tepe-dip)*0.618) : dip + ((tepe-dip)*0.618)
  13. fib50 = kontrol == true ? tepe - ((tepe-dip)*0.500) : dip + ((tepe-dip)*0.500)
  14. fib786 = kontrol == true ? tepe - ((tepe-dip)*0.786) : dip + ((tepe-dip)*0.786)
  15. fib382 = kontrol == true ? tepe - ((tepe-dip)*0.382) : dip + ((tepe-dip)*0.382)
  16. fib236 = kontrol == true ? tepe - ((tepe-dip)*0.236) : dip + ((tepe-dip)*0.236)
  17. fib1618 = kontrol == true ? tepe - ((tepe-dip)*1.618) : dip + ((tepe-dip)*1.618)
  18. fib1414 = kontrol == true ? tepe - ((tepe-dip)*1.414) : dip + ((tepe-dip)*1.414)
  19. fib1272 = kontrol == true ? tepe - ((tepe-dip)*1.272) : dip + ((tepe-dip)*1.272)
  20. fib3618 = kontrol == true ? tepe - ((tepe-dip)*3.618) : dip + ((tepe-dip)*3.618)
  21. fib1764 = kontrol == true ? tepe - ((tepe-dip)*1.764) : dip + ((tepe-dip)*1.764)
  22. fibminus0236 = kontrol == true ? tepe - ((tepe-dip)*-0.236) : dip + ((tepe-dip)*-0.236)
  23. fibminus0382 = kontrol == true ? tepe - ((tepe-dip)*-0.382) : dip + ((tepe-dip)*-0.382)
  24. fibminus05 = kontrol == true ? tepe - ((tepe-dip)*-0.500) : dip + ((tepe-dip)*-0.500)
  25. fibminus0168 = kontrol == true ? tepe - ((tepe-dip)*-0.168) : dip + ((tepe-dip)*-0.168)
  26. fibminus0786 = kontrol == true ? tepe - ((tepe-dip)*-0.786) : dip + ((tepe-dip)*-0.786)
  27. fibminus1 = kontrol == true ? tepe - ((tepe-dip)*-1.00) : dip + ((tepe-dip)*-1.000)
  28. fib3 = kontrol == true ? tepe - ((tepe-dip)*3) : dip + ((tepe-dip)*3)
  29.  
  30.  
  31. gunluk618 = request.security(syminfo.tickerid, "D",fib618)
  32. gunluk50 = request.security(syminfo.tickerid, "D",fib50)
  33. gunluk786 = request.security(syminfo.tickerid, "D",fib786)
  34. gunluk382 = request.security(syminfo.tickerid, "D",fib382)
  35. gunluk236 = request.security(syminfo.tickerid, "D",fib236)
  36. gunluk1618 = request.security(syminfo.tickerid, "D",fib1618)
  37. gunluk1414 = request.security(syminfo.tickerid, "D",fib1414)
  38. gunluk1272 = request.security(syminfo.tickerid, "D",fib1272)
  39. gunluk3618 = request.security(syminfo.tickerid, "D",fib3618)
  40. gunluk1764 = request.security(syminfo.tickerid, "D",fib1764)
  41. gunlukminus0236 = request.security(syminfo.tickerid, "D",fibminus0236)
  42. gunlukminus0382 = request.security(syminfo.tickerid, "D",fibminus0382)
  43. gunlukminus0168 = request.security(syminfo.tickerid, "D",fibminus0168)
  44. gunlukminus05 = request.security(syminfo.tickerid, "D",fibminus05)
  45. gunlukminus0786 = request.security(syminfo.tickerid, "D",fibminus0786)
  46. gunlukminus1 = request.security(syminfo.tickerid, "D",fibminus1)
  47. gunlukTepe = request.security(syminfo.tickerid, "D",tepe)
  48. gunlukDip = request.security(syminfo.tickerid, "D",dip)
  49.  
  50. plot(gunlukTepe,"1.000",color.white,trackprice = true,show_last = 1,offset = 1)
  51. plot(gunlukDip,"0.000",color.white,trackprice = true,show_last = 1,offset = 1)
  52. plot(gunluk618,"61.80%",color.green,trackprice = true,show_last = 1,offset = 1)
  53. plot(gunluk50,"50.00%",color.yellow,trackprice = true,show_last = 1,offset = 1)
  54. plot(gunluk786,"78.60%",color.green,trackprice = true,show_last = 1,offset = 1)
  55. plot(gunluk382,"38.20%",color.yellow,trackprice = true,show_last = 1,offset = 1)
  56. plot(gunluk236,"23.60%",color.green,trackprice = true,show_last = 1,offset = 1)
  57. plot(gunluk1414,"141.40%",color.orange,trackprice = true,show_last = 1,offset = 1)
  58. plot(gunluk1618,"161.80%",color.red,trackprice = true,show_last = 1,offset = 1)
  59. plot(gunluk1272,"127.20%",color.orange,trackprice = true,show_last = 1,offset = 1)
  60. plot(gunluk3618,"361.80%",color.red,trackprice = true,show_last = 1,offset = 1)
  61. plot(gunluk1764,"176.40%",color.orange,trackprice = true,show_last = 1,offset = 1)
  62. plot(gunlukminus0236,"-23.60%",color.red,trackprice = true,show_last = 1,offset = 1)
  63. plot(gunlukminus0382,"-38.20%",color.yellow,trackprice = true,show_last = 1,offset = 1)
  64. plot(gunlukminus05,"-50.00%",color.yellow,trackprice = true,show_last = 1,offset = 1)
  65. plot(gunlukminus0168,"-16.80%",color.red,trackprice = true,show_last = 1,offset = 1)
  66. plot(gunlukminus0786,"-78.60%",color.red,trackprice = true,show_last = 1,offset = 1)
  67. plot(gunlukminus0786,"-100.00%",color.red,trackprice = true,show_last = 1,offset = 1)
  68.  
  69.  
Advertisement
Add Comment
Please, Sign In to add comment