drew2323 / v2trading

V2Trading platform - live trading engine, backtesting and research tool.
https://trading.mujdenik.eu
8 stars 3 forks source link

support multisymbol and multitimeframe #223

Open drew2323 opened 3 months ago

drew2323 commented 3 months ago

Add multisymbol and multitimeframe (multi resolution).

Other areas to support:

When modeling source data take into consideration adding another economic data as sources.

Example of strategy/sources definition:

[dispatch_triggers] # which resolution triggers the which strategy section new_trade =2 trade_mngmt =1

- indicators and signals, current `stratvars`
```toml
[stratvars.indicators.bac_5s_rsi14]
   source_id = 1
   type = “RSI”
   length = 14
   on_confirmed_only = true
[stratvars.indicators.bac_15min_ma10]
   source_id =2
   type = “MA”
   length = 20
   on_confirmed_only = true
[stratvars.indicators.spy_1h_rsi10]
   source_id = 3
   type = “RSI”
   length = 10
   on_confirmed_only = true

[stratvars.signals.main.conditions]
    #preconditions 

    #SHORT ENTRY
    #signal.go_short_if_equals = -1

    #EXIT PROTECTION
    #slopetick5.dont_exit_long_if_above = 0

    #EXIT
    #divergence_volume.exit_long_if_below = 0.700

    #LONG ENTRY
    bac_5s_rsi14.AND.go_long_if_above = 70

Source identification in Indicator configuration Currently indicator configuration uses source attribute referring to primary resolution and also direct source names (close,RSI,swap,open...) are used within configurable statement. These have to be extended to link to source_id (maybe prefix or other). Support current cbar_indicatotors (tick bases time series).

Examples of current source usage:

    cp.source = 'bars|vwap'  #meaning bars entity and vwap columns, other can be `indicators|rsi14`, used in indicators
    cp.next = ['cbar_indicators|time'] #optional, source posilany explicitne do next ve stejnojmenném parametru - used in classed indicators
    cp.source = "cbar_indicators|tick_price"
    cp.expression = 'close[-1]-(atr10[-1]*2)' #in expression
    cp.source = 'dailyBars|high'

Frontend changes (primary and secondiers chart panes):

Requirements in progress: https://docs.google.com/document/d/1cHK1Brv92CFUpZF47trB8_IjT0aoQwunB28FJMqINkU/edit?usp=sharing

Current Component diagram

Proposed changes Component diagram

drew2323 commented 2 months ago

A new branch feature/multisymbol223 has been created to accommodate all partial changes from local development branches.

drew2323 commented 2 months ago

Next steps:

drew2323 commented 2 months ago