forked from nique_372/AiDataTaskRuner
53 lines
2.8 KiB
Text
53 lines
2.8 KiB
Text
name = [RSI Context Matrix] // 5-bar rolling window - 3 features per bar (15 values total)
|
|
|
|
@ Config
|
|
{
|
|
cols = 3; // Features per row: RSI value, VIDYA distance, normalized StdDev
|
|
}
|
|
|
|
// Matrix of 5 rows: each row captures a different bar in the lookback window.
|
|
// Useful for LSTM, Transformer, or any sequence-based ML model.
|
|
@ New Matrix(rows=5)
|
|
{
|
|
// #Generate([start, step, len]) auto-builds the index list.
|
|
// [0,1,5] -> indices [0, 1, 2, 3, 4]
|
|
// idx=0 = current bar, idx=4 = 4 bars back
|
|
# Generate([0,1,5])
|
|
{
|
|
[Rsi_Valor][](Timeframe=_Period|Period=14|Applied=PRICE_CLOSE|Hide=true)
|
|
[Vidya_Distancia][](Timeframe=_Period|CmoPeriod=9|EmaPeriod=12|Applied=PRICE_CLOSE|Hide=true)
|
|
}
|
|
}
|
|
|
|
-----
|
|
name: "Rsi context matrix"
|
|
config:
|
|
cols: 3
|
|
|
|
main:
|
|
- context: matrix
|
|
config:
|
|
rows: 5
|
|
body:
|
|
- type: generate
|
|
config:
|
|
index: [0, 1, 5]
|
|
body:
|
|
- name: Rsi_Valor
|
|
prefix: ""
|
|
params:
|
|
Timeframe: _Period
|
|
Period: 14
|
|
Applied: PRICE_CLOSE
|
|
- name: Vidya_Distancia
|
|
prefix: ""
|
|
params:
|
|
Timeframe: _Period
|
|
CmoPeriod: 9
|
|
EmaPeriod: 12
|
|
Applied: PRICE_CLOSE
|
|
Types: ["suma", "resta"]
|
|
|
|
|
|
|
|
|