mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-21 22:43:52 +00:00
pass symbol property into the TradingViewChart
This commit is contained in:
parent
f9a1d37d63
commit
0030abfd3b
|
@ -29,10 +29,21 @@ const ReportDetails = (props: ReportDetailsProps) => {
|
|||
})
|
||||
}, [props.runID])
|
||||
|
||||
if (!reportSummary) {
|
||||
return <Container>
|
||||
<h2>Loading {props.runID}</h2>
|
||||
</Container>;
|
||||
}
|
||||
|
||||
return <Container>
|
||||
<h2>Back-test Run {props.runID}</h2>
|
||||
<div>
|
||||
<TradingViewChart basePath={props.basePath} runID={props.runID} intervals={["1m", "5m", "1h"]}/>
|
||||
{
|
||||
reportSummary.symbols.map((symbol: string) => {
|
||||
return <TradingViewChart basePath={props.basePath} runID={props.runID} symbol={symbol} intervals={["1m", "5m", "1h"]}/>
|
||||
})
|
||||
}
|
||||
|
||||
</div>
|
||||
</Container>;
|
||||
};
|
||||
|
|
|
@ -77,7 +77,7 @@ const parsePosition = () => {
|
|||
};
|
||||
}
|
||||
|
||||
const fetchPositionHistory = (basePath, runID, setter) => {
|
||||
const fetchPositionHistory = (basePath, runID) => {
|
||||
// TODO: load the filename from the manifest
|
||||
return fetch(
|
||||
`${basePath}/${runID}/bollmaker:ETHUSDT-position.tsv`,
|
||||
|
@ -311,7 +311,7 @@ const TradingViewChart = (props) => {
|
|||
});
|
||||
|
||||
Promise.all([ordersFetcher, positionHistoryFetcher]).then(() => {
|
||||
fetchKLines(props.basePath, props.runID, 'ETHUSDT', currentInterval).then((data) => {
|
||||
fetchKLines(props.basePath, props.runID, props.symbol, currentInterval).then((data) => {
|
||||
setData(removeDuplicatedKLines(data));
|
||||
})
|
||||
});
|
||||
|
|
|
@ -27,7 +27,7 @@ export interface ReportSummary {
|
|||
startTime: Date;
|
||||
endTime: Date;
|
||||
sessions: string[];
|
||||
symbols: null;
|
||||
symbols: string[];
|
||||
initialTotalBalances: BalanceMap;
|
||||
finalTotalBalances: BalanceMap;
|
||||
symbolReports: SymbolReport[];
|
||||
|
|
Loading…
Reference in New Issue
Block a user