Polychrome  [SOLVED]

Questions about MultiCharts and user contributed studies.
syracusepro
Posts: 17
Joined: 29 Sep 2016

Polychrome  [SOLVED]

Postby syracusepro » 29 Sep 2016

Need help with the following code:

Code: Select all


Inputs:
Double price(close),
Double bxo(0.2),
Double sxo(-0.04),
Double length(14);

Variables:

Double num(0),
Double denom(0),
Double PM(0),
Double accuD(0),
Double accuN(0);

For N = 1 to length - 1 begin
accuN = accuN + (price - getValue(price, N, length)) / Sqrt[N];
end;

For P = 1 to length - 1 begin
accuD = accuD + Sqrt[D];
end;

PM = (num / denom) * 7;


SetPlotColor(1, PMColor);
SetPlotWidth(1,2);


plot1(PM, "PM");

Thanks.

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

Re: Polychrome

Postby TJ » 29 Sep 2016

Need help with the following code:
::
Thanks.

See post #4
viewtopic.php?f=16&t=11713

syracusepro
Posts: 17
Joined: 29 Sep 2016

Re: Polychrome

Postby syracusepro » 29 Sep 2016

The code is not compiling. It seems to be a problem with the For loop.

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Polychrome

Postby hughesfleming » 30 Sep 2016

Take a look at this thread. The code you posted is not for Multicharts.

https://futures.io/easylanguage-program ... ation.html

syracusepro
Posts: 17
Joined: 29 Sep 2016

Re: Polychrome

Postby syracusepro » 30 Sep 2016

hughes; I would like to appreciate your help as that link gave me most of what I needed then I completed the plot by adding the rest of the code, which I am posting here. Thanks a lot.

Code: Select all

Inputs:
price ( Close ),
length ( 8 );

Variables:
num ( 0 ),
indexN ( 0 ),
accuN ( 0 ),
denom ( 0 ),
indexD ( 0 ),
accuD ( 0 ),
offset ( 0 ),
PM ( 0 );

accuN = 0;
for indexN = 1 to length+1 begin
if indexN > length then offset = length else offset = indexN;
accuN = accuN + (price - price[offset]) / SquareRoot(indexN);
end;
num = accuN;

accuD = 0;
for indexD = 1 to length+1 begin
accuD = accuD + SquareRoot(indexD);
end;
denom = accuD;

PM = (num / denom) * 7;
plot1(PM, "PM");

begin
SetPlotColor(1, PM);
SetPlotWidth(1, 3);
Alert(getsymbolname + "PM");
end
Last edited by syracusepro on 30 Sep 2016, edited 1 time in total.

hughesfleming
Posts: 275
Joined: 22 Apr 2014
Has thanked: 70 times
Been thanked: 72 times

Re: Polychrome

Postby hughesfleming » 30 Sep 2016

You are welcome syracusepro. If you have not already seen this then you might find this helpful.

http://meyersanalytics.com/publications2/polychrmtm.pdf


Return to “MultiCharts”