In a Spread Diff chart, can you show the symbols used on the chart?  [SOLVED]

Questions about MultiCharts and user contributed studies.
synonym
Posts: 70
Joined: 20 Feb 2009
Has thanked: 10 times
Been thanked: 3 times

In a Spread Diff chart, can you show the symbols used on the chart?

Postby synonym » 04 Jul 2018

Hi,
I presume you'd do this by using the "description" somehow, but i can't get it to work.

Anyone solved this?

Cheers
Syn

User avatar
TJ
Posts: 7740
Joined: 29 Aug 2006
Location: Global Citizen
Has thanked: 1033 times
Been thanked: 2221 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby TJ » 04 Jul 2018

Hi,
I presume you'd do this by using the "description" somehow, but i can't get it to work.

Anyone solved this?

Cheers
Syn

What do you want?
Can you post a mock up?

synonym
Posts: 70
Joined: 20 Feb 2009
Has thanked: 10 times
Been thanked: 3 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby synonym » 04 Jul 2018

Hi TJ

So that on the price chart - instead of the status line simply saying Spread-Diff, i'd like it to tell me which symbols are in the spread, e.g. SPY - GLD

Thanks
Syn

User avatar
Svetlana MultiCharts
Posts: 645
Joined: 19 Oct 2017
Has thanked: 3 times
Been thanked: 163 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby Svetlana MultiCharts » 06 Jul 2018

Hello, synonym

You can plot symbol names of two data series in the Status Line of Spread – Diff indicator. Below is the code example:

Code: Select all

inputs: DataSeries1( Close of data1 ), DataSeries2( Close of data2 ) ;

Plot1( DataSeries1 - DataSeries2, "SprdDiff" ) ;
Plot2(symbolname data2);
Plot3(symbolname data1);

synonym
Posts: 70
Joined: 20 Feb 2009
Has thanked: 10 times
Been thanked: 3 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby synonym » 09 Jul 2018

HI Svetlana

Thank you for your reply. How would i do this when i am plotting the spread as a bar and not a line on close? Here's my code for the spread-diff plotted as a bar.

Thanks very much
Syn

Code: Select all

inputs: DataSeries1( Open of data1 ), DataSeries2( Open of data2 ),
DataSeries3( High of data1 ), DataSeries4( High of data2 ),
DataSeries5( Low of data1 ), DataSeries6( Low of data2 ),
DataSeries7( Close of data1 ), DataSeries8( Close of data2 );

Var: SprdO(0), SprdH(0), SprdL(0), SprdC(0), Sprd(0);

SprdO = (DataSeries1 - DataSeries2);
SprdH = (DataSeries3 - DataSeries4);
SprdL = (DataSeries5 - DataSeries6);
SprdC = (DataSeries7 - DataSeries8);

If SprdC > SprdC[1] then SetPlotColor (3,darkgreen)
else SetPlotColor(3, darkred);
Plotpaintbar(SprdH[0],SprdL[0],SprdO[0],SprdC[0]);

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby ABC » 09 Jul 2018

Hi synonym,

you would use Plot5 and Plot6 for example (instead of Plot2 and Plot3 from Svetlana's code). The reason being that PlotPaintBar will use the Plot numbers 1-4 in your code.

Regards,

ABC

HI Svetlana

Thank you for your reply. How would i do this when i am plotting the spread as a bar and not a line on close? Here's my code for the spread-diff plotted as a bar.

Thanks very much
Syn

Code: Select all

inputs: DataSeries1( Open of data1 ), DataSeries2( Open of data2 ),
DataSeries3( High of data1 ), DataSeries4( High of data2 ),
DataSeries5( Low of data1 ), DataSeries6( Low of data2 ),
DataSeries7( Close of data1 ), DataSeries8( Close of data2 );

Var: SprdO(0), SprdH(0), SprdL(0), SprdC(0), Sprd(0);

SprdO = (DataSeries1 - DataSeries2);
SprdH = (DataSeries3 - DataSeries4);
SprdL = (DataSeries5 - DataSeries6);
SprdC = (DataSeries7 - DataSeries8);

If SprdC > SprdC[1] then SetPlotColor (3,darkgreen)
else SetPlotColor(3, darkred);
Plotpaintbar(SprdH[0],SprdL[0],SprdO[0],SprdC[0]);

synonym
Posts: 70
Joined: 20 Feb 2009
Has thanked: 10 times
Been thanked: 3 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby synonym » 09 Jul 2018

Hi ABC

Ah of course! That's very much for the advice.

Best
Syn

synonym
Posts: 70
Joined: 20 Feb 2009
Has thanked: 10 times
Been thanked: 3 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby synonym » 09 Jul 2018

Hi ABC
have tried your suggestion, please see attached code. It make no difference, it still plots, but the status line still simply says, "Spread Diff Bar"

Code: Select all

inputs: DataSeries1( Open of data1 ), DataSeries2( Open of data2 ),
DataSeries3( High of data1 ), DataSeries4( High of data2 ),
DataSeries5( Low of data1 ), DataSeries6( Low of data2 ),
DataSeries7( Close of data1 ), DataSeries8( Close of data2 );

Var: SprdO(0), SprdH(0), SprdL(0), SprdC(0), Sprd(0);

SprdO = (DataSeries1 - DataSeries2);
SprdH = (DataSeries3 - DataSeries4);
SprdL = (DataSeries5 - DataSeries6);
SprdC = (DataSeries7 - DataSeries8);

If SprdC > SprdC[1] then SetPlotColor (3,darkgreen)
else SetPlotColor(3, darkred);
Plotpaintbar(SprdH[0],SprdL[0],SprdO[0],SprdC[0]);
Plot5(symbolname data1);
Plot6(symbolname data2);

User avatar
ABC
Posts: 718
Joined: 16 Dec 2006
Location: www.abctradinggroup.com
Has thanked: 125 times
Been thanked: 408 times
Contact:

Re: In a Spread Diff chart, can you show the symbols used on the chart?  [SOLVED]

Postby ABC » 09 Jul 2018

Hi synonym,

you might have to enable the indicator value display in the status line. Your code is showing the symbol names fine on my end.

Regards,

ABC
Hi ABC
have tried your suggestion, please see attached code. It make no difference, it still plots, but the status line still simply says, "Spread Diff Bar"

Code: Select all

inputs: DataSeries1( Open of data1 ), DataSeries2( Open of data2 ),
DataSeries3( High of data1 ), DataSeries4( High of data2 ),
DataSeries5( Low of data1 ), DataSeries6( Low of data2 ),
DataSeries7( Close of data1 ), DataSeries8( Close of data2 );

Var: SprdO(0), SprdH(0), SprdL(0), SprdC(0), Sprd(0);

SprdO = (DataSeries1 - DataSeries2);
SprdH = (DataSeries3 - DataSeries4);
SprdL = (DataSeries5 - DataSeries6);
SprdC = (DataSeries7 - DataSeries8);

If SprdC > SprdC[1] then SetPlotColor (3,darkgreen)
else SetPlotColor(3, darkred);
Plotpaintbar(SprdH[0],SprdL[0],SprdO[0],SprdC[0]);
Plot5(symbolname data1);
Plot6(symbolname data2);

synonym
Posts: 70
Joined: 20 Feb 2009
Has thanked: 10 times
Been thanked: 3 times

Re: In a Spread Diff chart, can you show the symbols used on the chart?

Postby synonym » 09 Jul 2018

HI ABC
You're right! I missed that. Thank you.
Cheers
Syn


Return to “MultiCharts”