Skip to content

Commit

Permalink
feat: add contracts
Browse files Browse the repository at this point in the history
  • Loading branch information
simoneb committed Oct 15, 2023
1 parent bf5eb0b commit 1211b50
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions src/parsers/wsp.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,11 @@ const columns = [
return /true/i.test(value) ? '✅' : '❌'
}
},
{
field: 'contracts',
headerName: 'Contracts',
align: 'center'
},
{
field: 'charts',
flex: 2,
Expand Down Expand Up @@ -118,15 +123,20 @@ export async function handle(file) {

const rows = Array.from(windowNumbers)
.sort()
.map(windowNumber => {
const strategyData = `Wsp\\Window_${windowNumber}\\ChartManager\\Strategy\\StrategyATPersistHelper`
const charts = getCharts(parsed, windowNumber)
.map(windowId => {
const strategyData = `Wsp\\Window_${windowId}\\ChartManager\\Strategy\\StrategyATPersistHelper`
const charts = getCharts(parsed, windowId)
const myContracts =
parsed[
`Wsp\\Window_${windowId}\\ChartManager\\Strategy\\SignalObject_0\\SignalHelper\\InputHelper\\Input_myContracts`
]

return {
strategyName: parsed[strategyData].StrategyName,
symbolName: parsed[strategyData].SymbolName,
autoTrading: parsed[strategyData].ATOn,
charts
charts,
contracts: myContracts?.Value
}
})

Expand Down

0 comments on commit 1211b50

Please sign in to comment.