Advertisement
tabnation

ahk trading

Jul 1st, 2021
251
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. ^1::
  2. MouseGetPos, xposP, yposP
  3. Return
  4. ^2::
  5. MouseGetPos, xposB, yposB
  6. Return
  7. ^3::
  8. MouseGetPos, xposS, yposS
  9. Return
  10.  
  11. f1::
  12. ;setup
  13. InputBox, SellAmount, Sell ,What Price do you want to sell at?
  14. InputBox, BuyAmount, Buy ,What Price do you want to Buy at?
  15. InputBox, SellBuyAmount, Amount ,How much to sell/buy?
  16. settitlematchmode 2
  17. Settimer, CheckNow, 15000 ;800000 15mins
  18. Return
  19.  
  20. ;Grab info and clean up
  21. CheckNow:
  22. winactivate, ETH
  23. sleep 1000
  24. MouseClick, left, %xposP%, %yposP%, 2
  25. send ^c
  26.  
  27. ;Should I sell?
  28. if clipboard > %SellAmount%
  29. {
  30. MouseClick, left, %xposS%, %yposS%
  31. send {tab 2}
  32. send %SellBuyAmount%
  33. sleep 2000
  34. send {tab 2}
  35. sleep 1000
  36. send {enter}{tab}{shift down}{tab}{shift up}
  37. sleep 2000
  38. ;send {enter}
  39. CountSell++
  40. send +^r
  41. Return
  42. }
  43.  
  44. ;Should I Buy?
  45. if clipboard < %BuyAmount%
  46. {
  47. MouseClick, left, %xposB%, %yposB%
  48. send {tab 2}
  49. send %SellBuyAmount%
  50. sleep 2000
  51. send {tab 2}
  52. sleep 1000
  53. send {enter}{tab}{shift down}{tab}{shift up}
  54. sleep 2000
  55. ;send {enter}
  56. CountBuy++
  57. send +^r
  58. }
  59. Return
  60.  
  61. f2::
  62. ProfileAmount := (%CountSell% - %CountBuy%) * %SellBuyAmount%
  63. Msgbox, Sold %CountSell% Times `nBought %CountBuy% times `n Profit = %ProfileAmount%
  64. Return
  65.  
  66. f3::
  67. exitapp
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
Advertisement
RAW Paste Data Copied
Advertisement