Skip to content

Instantly share code, notes, and snippets.

@saleh-old
Created June 26, 2020 08:54
Show Gist options
  • Save saleh-old/dee6f2e583f2fa6090e35881cca0271b to your computer and use it in GitHub Desktop.
Save saleh-old/dee6f2e583f2fa6090e35881cca0271b to your computer and use it in GitHub Desktop.
# get the ATR indicator value for current candle
atr = ta.atr(self.candles)
# enter at current price with a market order
entry = self.price
stop = entry - (atr * 3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment