Switching symbol in Data2 using CommandLine  [SOLVED]

Questions about MultiCharts and user contributed studies.
OZ Trade
Posts: 39
Joined: 08 Nov 2013
Has thanked: 11 times
Been thanked: 18 times

Switching symbol in Data2 using CommandLine

Postby OZ Trade » 01 Jan 2014

Code: Select all

vars: Sym1 (symbol), Sym2 (symbol data2);

Condition1= Sym1 = "CVX" and Sym2 <> "XOM";

If condition1 then

CommandLine(".csy dnum=2, name=XOM, df=IQFeed");
Hi all,

When I run this in Data1 with the symbol being CVX it does indeed switch the symbol in Data2 to XOM, however, there is a long pause while calculating, usually longer than 30 seconds.

If I put "Abort;" at the end it executes immediately but of course that is not ideal for how I want to use it.

Can anybody suggest another way to get it execute immediately?

Thank you

OZ Trade
Posts: 39
Joined: 08 Nov 2013
Has thanked: 11 times
Been thanked: 18 times

Re: Switching symbol in Data2 using CommandLine  [SOLVED]

Postby OZ Trade » 02 Jan 2014

OK Solved..

Just need to calculate on last bar only..

Thanks


Return to “MultiCharts”