H256 / gekko-quasar-ui

An UI port for gekko trading bot using Quasar framework.
MIT License
112 stars 50 forks source link

Add functionality to the backtesting market and indicator graphs #26

Closed thetestspecimen closed 4 years ago

thetestspecimen commented 4 years ago

Indicators can now be added to both the market graph and three independent indicator graphs below the market. The user can opt to have the indicators assigned automatically or have full control over where they are placed by using specific syntax when initialising the indicators in the strategy file for gekko.

The relevant adjustments are detailed below

H256 commented 4 years ago

Hi @thetestspecimen - thanks for this wonderful contribution! I will test and review during the next week and then merge. ;)

H256 commented 4 years ago

@thetestspecimen I have tested and found, that it doesn't work with most of the gekko native strategies (or any strategy that uses less than 3 indicators). Would you mind having a look at this again?

To reproduce - select RSI or MACD native strategy for example (both have only one indicator result per candle). It will not render the chart, giving the error

[Vue warn]: Error in mounted hook: "TypeError: options.xAxis[2] is undefined"

found in

---> <VueEchartWrapper> at src/components/global/chart.vue
       <QCardSection>
         <QCard>
           <Result> at src/components/backtester/result/result.vue
             <Backtester> at src/components/backtester/backtester.vue
               <QPage>
                 <BacktesterPage> at src/pages/backtest.vue
                   <QPageContainer>
                     <QLayout>
                       <MainLayoutPage> at src/layouts/default.vue
                         <App> at src/App.vue
                           <Root>

This is true for all other strategies using < 3 Indicators. All other things here look good to me.

thetestspecimen commented 4 years ago

Ok. No problem. I will take a look at this and get back to you.

I tend to use talib indicators rather than the gekko indicators. Although I did run through a few gekko indicators as a test and didn't hit a problem. We will see...

H256 commented 4 years ago

Reviewed. Looks very good.