Open robert-hopla opened 2 years ago
hey @robert-hopla ,
timeframe
and range
(# of periods) in setMarket's options
parameter.scriptIdPart
of the response.)
const TradingView = require('../main');
const fs = require('fs');
/ This example tests fetching chart data of a number of candles before or after a timestamp /
const client = new TradingView.Client(); const chart = new client.Session.Chart(); chart.setMarket('BINANCE:BTCEUR', { timeframe: '60', currency: 'EUR', });
TradingView.getIndicator('STD;Bollinger%1Bands%1Strategy').then(async (indic) => {
console.log(Loading '${indic.description}' study...
);
const study = new chart.Study(indic);
study.onUpdate(() => {
const performance = SUPERTREND.strategyReport.performance;
console.log('performance', performance);
client.end();
});
});
how to download a specific time range/timeframe of data before starting a strategy backtest
how to set the ranges of inputs for which to backtest the strategy
You can use Fake replay mode or Real replay mode.
how to export the performance summary for every combination of inputs
There is no shortcut, you have to test them all. You can do it synchronously or asynchronously, it doesn't matter.
When backtesting in the browser, changing the inputs instantly updates the performance summary. You think this is run in the browser? Or does it actually come from the server this fast?
The PineScript engine is server-side.
have you tested if this can be done multithreaded? do they throttle you?
I've never had a throttling issue. I advise against abusing it anyway.
All you need is in the ./examples
directory.
Hey Mathieu, have been playing with your library, very promising!!
I have some questions I have you can help me figure out: 1) how to download a specific time range/timeframe of data before starting a strategy backtest 3) how to select and get the strategy inputs 2) how to set the ranges of inputs for which to backtest the strategy
When backtesting in the browser, changing the inputs instantly updates the performance summary. You think this is run in the browser? Or does it actually come from the server this fast?
have you tested if this can be done multithreaded? do they throttle you?
Super excited about this! would mean i no longer have to code in EasyLanguage to optimize :)