SUPERTREND

Questions about MultiCharts .NET and user contributed studies.
Carl71
Posts: 17
Joined: 17 Apr 2013
Has thanked: 2 times
Been thanked: 1 time

SUPERTREND

Postby Carl71 » 20 Feb 2015

I have the better version of the Supertrend in PLA format
Does someone can convert this script in PLE?

Thanks in advance
Attachments
SuperTrend.png
(72.09 KiB) Downloaded 2192 times
BMT SuperTrend.pla
(9.31 KiB) Downloaded 672 times

User avatar
JoshM
Posts: 2099
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1526 times
Been thanked: 1504 times
Contact:

Re: SUPERTREND

Postby JoshM » 20 Feb 2015

Could you provide the indicator code in a post or .txt file? Then we can take a look at it without running the risk that the .pla file overwrites existing PowerLanguage functions and/or indicators.

Carl71
Posts: 17
Joined: 17 Apr 2013
Has thanked: 2 times
Been thanked: 1 time

Re: SUPERTREND

Postby Carl71 » 20 Feb 2015

Could you provide the indicator code in a post or .txt file? Then we can take a look at it without running the risk that the .pla file overwrites existing PowerLanguage functions and/or indicators.
Function:

Code: Select all

// SuperTrend function


inputs:
ATRLength(NumericSimple), ATRMult(NumericSimple), Strength(NumericSimple), STrend(NumericRef);

vars:
ATR(0),
avg(0),
dn(0),
up(0),
trend(1),
flag(0),
flagh(0),
ST(0),
hl(0);


hl = Highest(High, ATRLength) - Lowest(Low, ATRLength);
ATR = XAverage(hl, ATRLength);
avg = (XAverage(high, Strength) + XAverage(low, Strength))/2;
up = avg + ATR;
dn = avg - ATR;

if c > up[1] and c > Highest(High, Strength)[1] then
trend = 1
else if c < dn[1] and c < Lowest(Low, Strength)[1] then
trend = -1;


if trend < 0 and trend[1] > 0 then flag=1 else flag=0;
if trend > 0 and trend[1] < 0 then flagh = 1 else flagh = 0;

if trend > 0 and dn < dn[1] then dn=dn[1];
if trend < 0 and up > up[1] then up=up[1];

if flag = 1 then up = avg + ATR;
if flagh = 1 then dn = avg - ATR;

if trend = 1 then ST = dn else ST = up;
SuperTrend = ST;
STrend = trend;
Indicator:

Code: Select all

// SuperTrend indicator


inputs:
ATRLength(9), ATRMult(1), Strength(9);

vars:
strend(0),
st(0);

st = SuperTrend(ATRLength, ATRMult, Strength, strend);

Plot1(st,"Up");
Plot2(st,"Down");
Plot3(st,"SuperTrend",iff(strend = 1,GetPlotColor(1),GetPlotColor(2)));

Carl71
Posts: 17
Joined: 17 Apr 2013
Has thanked: 2 times
Been thanked: 1 time

Re: SUPERTREND

Postby Carl71 » 24 Feb 2015

Hello Josh,

Are you working on this script?
If Yes, could you please to attach the file here?

Thank You

User avatar
JoshM
Posts: 2099
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1526 times
Been thanked: 1504 times
Contact:

Re: SUPERTREND

Postby JoshM » 24 Feb 2015

Are you working on this script?
If Yes, could you please to attach the file here?
No, I didn't have time for it. Sorry.

Carl71
Posts: 17
Joined: 17 Apr 2013
Has thanked: 2 times
Been thanked: 1 time

Re: SUPERTREND

Postby Carl71 » 24 Feb 2015

Are you working on this script?
If Yes, could you please to attach the file here?
No, I didn't have time for it. Sorry.
This means that you will not work on it?

Thanks

User avatar
JoshM
Posts: 2099
Joined: 20 May 2011
Location: The Netherlands
Has thanked: 1526 times
Been thanked: 1504 times
Contact:

Re: SUPERTREND

Postby JoshM » 26 Feb 2015

This means that you will not work on it?
No, not in the near future at least. Perhaps someone else in the MultiCharts .NET forum can help.

vincat
Posts: 4
Joined: 24 Aug 2014
Has thanked: 1 time
Been thanked: 4 times

Re: SUPERTREND

Postby vincat » 26 Feb 2015

I did a conversion of a powerlanguage supertrend indicator I found on Big Mike's forum while I was learning how to use powerlanguage.NET. Not sure if it's the same as yours but it looks quite similar.

However, I never really used it so I cannot guarantee that it works correctly, but hopefully it can help as a staring point. I'm currently working on other projects, so unfortunately I will not be able to give further assistance.
Attachments
SuperTrend.pln
(2.12 KiB) Downloaded 648 times

Carl71
Posts: 17
Joined: 17 Apr 2013
Has thanked: 2 times
Been thanked: 1 time

Re: SUPERTREND

Postby Carl71 » 27 Feb 2015

Vincat,

This is exactly what I was looking for.

Thank You very much!

User avatar
Henry MultiСharts
Posts: 9164
Joined: 25 Aug 2011
Has thanked: 1264 times
Been thanked: 2939 times

Re: SUPERTREND

Postby Henry MultiСharts » 27 Feb 2015

Supertrend for MultiCharts .NET has also been posted here.

Carl71
Posts: 17
Joined: 17 Apr 2013
Has thanked: 2 times
Been thanked: 1 time

Re: SUPERTREND

Postby Carl71 » 01 Mar 2015

Supertrend for MultiCharts .NET has also been posted here.
Yes, but it's not the correct version, and it has some bugs
The above version posted by Vincat is the common version used by all charting softwares and it is identical to the version I posted in .pla format
Why not adding this version by default in MC?


Return to “MultiCharts .NET”