Skip to content

0.8.0

Choose a tag to compare

@chauduyphanvu chauduyphanvu released this 18 Nov 20:03
· 36 commits to main since this release

More to say in a rule. Every block that ran in 0.7.0 gives the same result in 0.8.0.

  • Definitions. uptrend = close > sma(200) names a condition or a number. Use the name in rules, in a ranking score and in other definitions, as in buy when uptrend and rsi(2) < 10; uptrend of SPY and uptrend[1] read it for another ticker or a bar back. The rule table opens a definition into its parts, and hovering over its name shows what it stands for.
  • Conditions that last. close > sma(50) for 3 bars holds on each of the last 3 bars, rsi(2) < 10 within 5 bars on any of them, and count(close > close[1], 10) counts the bars it held. rsi(2) between 10 and 30 sets a range, and crosses alone means either way.
  • Rules for a few tickers at once. for SPY, QQQ: gives the rules and stops under it to each ticker listed.
  • Exits that follow the position. highest since entry, lowest since entry and position return make a chandelier exit or a profit target, as in sell when close < highest since entry - 3 * atr(22).
  • New functions. sum, dema, tema, kama, aroon_up, aroon_down, psar, cmf, linreg, rsquared, efficiency and streak, with sqrt, log, exp and if(condition, a, b) for scores such as Clenow's momentum.
  • Calendar. trading_day and trading_days_left count the trading days of the month, for turn-of-the-month rules, and quarter, week_start, week_end, quarter_start, quarter_end, year_start and year_end mark the edges of each period.
  • A block that already used one of the new words as a parameter name, such as count = 20, keeps working: the name means its parameter there.
  • Tried in a running Obsidian on live prices, with exits, levels and calendar dates checked by hand.