SHARE
TWEET

Untitled

a guest Jun 16th, 2019 63 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //@version=2
  2. study
  3.  
  4. threshold = input(title="Threshold", type=float, defval=0.0014,
  5. step=0.0001)
  6.  
  7.  
  8.  
  9. buying = l3_0 > threshold ? true : l3_0 < -threshold ? false : buying[1]
  10.  
  11. hline(0, title="base line")
  12. //bgcolor(l3_0 > 0.0014 ? green : l3_0 < -0.0014 ? red : gray, transp=20)
  13. bgcolor(buying ? green : red, transp=20)
  14. plot(l3_0, color=silver, style=area, transp=50)
  15. plot(l3_0, color=aqua, title="prediction")
  16.  
  17. //longCondition = buying
  18. //if (longCondition)
  19. //    strategy.entry("Long", strategy.long)
  20.  
  21. //shortCondition = buying != true
  22. //if (shortCondition)
  23. //    strategy.entry("Short", strategy.short)
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top