Advertisement
NKactive

Untitled

Aug 6th, 2023
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. import NKactive/NKactiveLibrary/1 as NK
  2.  
  3. float posValueSensitivity = 0.25
  4. float negValueSensitivity = 0.25
  5. float RoCSensitivity = 50
  6. int RoCAverage = 1
  7. int trendRising = 1
  8. int trendFalling = 1
  9.  
  10. [triggerPositionBuy, triggerPositionSell] = NK.logicTPI(0 ,0 ,0 ,0, posValueSensitivity, negValueSensitivity, RoCSensitivity, RoCAverage, trendRising, trendFalling) //, valueSensitivity, RoCSensitivity)
  11.  
  12. if triggerPositionBuy
  13. strategy.entry("My Long Entry Id", strategy.long)
  14. if triggerPositionSell
  15. strategy.entry("My Short Entry Id", strategy.short)
  16.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement