Portfolio Trader Strategy Examples: Difference between revisions
From MultiCharts
Line 171: | Line 171: | ||
<syntaxhighlight>var: slave_idx(pmms_strategies_get_by_symbol_name(symbolname data2)); | <syntaxhighlight>var: slave_idx(pmms_strategies_get_by_symbol_name(symbolname data2)); | ||
once if 0 > slave_idx then | once if 0 > slave_idx then | ||
raiseruntimeerror(text("specified slave trader on instrument ", doublequote, symbolname data2, doublequote, " not found"));</syntaxhighlight> | raiseruntimeerror(text("specified slave trader on instrument ", doublequote, symbolname data2, doublequote, "not found"));</syntaxhighlight> | ||
To synchronize the capital invested into positions for both instruments, we need to send the price of the current position of the main instrument to the pair strategy: | To synchronize the capital invested into positions for both instruments, we need to send the price of the current position of the main instrument to the pair strategy: |