Repository navigation
0.8.0
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 inbuy when uptrend and rsi(2) < 10;uptrend of SPYanduptrend[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 barsholds on each of the last 3 bars,rsi(2) < 10 within 5 barson any of them, andcount(close > close[1], 10)counts the bars it held.rsi(2) between 10 and 30sets a range, andcrossesalone 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 entryandposition returnmake a chandelier exit or a profit target, as insell when close < highest since entry - 3 * atr(22). - New functions.
sum,dema,tema,kama,aroon_up,aroon_down,psar,cmf,linreg,rsquared,efficiencyandstreak, withsqrt,log,expandif(condition, a, b)for scores such as Clenow's momentum. - Calendar.
trading_dayandtrading_days_leftcount the trading days of the month, for turn-of-the-month rules, andquarter,week_start,week_end,quarter_start,quarter_end,year_startandyear_endmark 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.