mirror of
https://github.com/c9s/bbgo.git
synced 2024-11-10 09:11:55 +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])
|
}, [props.runID])
|
||||||
|
|
||||||
|
if (!reportSummary) {
|
||||||
|
return <Container>
|
||||||
|
<h2>Loading {props.runID}</h2>
|
||||||
|
</Container>;
|
||||||
|
}
|
||||||
|
|
||||||
return <Container>
|
return <Container>
|
||||||
<h2>Back-test Run {props.runID}</h2>
|
<h2>Back-test Run {props.runID}</h2>
|
||||||
<div>
|
<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>
|
</div>
|
||||||
</Container>;
|
</Container>;
|
||||||
};
|
};
|
||||||
|
|
|
@ -77,7 +77,7 @@ const parsePosition = () => {
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
const fetchPositionHistory = (basePath, runID, setter) => {
|
const fetchPositionHistory = (basePath, runID) => {
|
||||||
// TODO: load the filename from the manifest
|
// TODO: load the filename from the manifest
|
||||||
return fetch(
|
return fetch(
|
||||||
`${basePath}/${runID}/bollmaker:ETHUSDT-position.tsv`,
|
`${basePath}/${runID}/bollmaker:ETHUSDT-position.tsv`,
|
||||||
|
@ -311,7 +311,7 @@ const TradingViewChart = (props) => {
|
||||||
});
|
});
|
||||||
|
|
||||||
Promise.all([ordersFetcher, positionHistoryFetcher]).then(() => {
|
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));
|
setData(removeDuplicatedKLines(data));
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
|
@ -27,7 +27,7 @@ export interface ReportSummary {
|
||||||
startTime: Date;
|
startTime: Date;
|
||||||
endTime: Date;
|
endTime: Date;
|
||||||
sessions: string[];
|
sessions: string[];
|
||||||
symbols: null;
|
symbols: string[];
|
||||||
initialTotalBalances: BalanceMap;
|
initialTotalBalances: BalanceMap;
|
||||||
finalTotalBalances: BalanceMap;
|
finalTotalBalances: BalanceMap;
|
||||||
symbolReports: SymbolReport[];
|
symbolReports: SymbolReport[];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user