An indicator based on several others

Posted By Fisherman Sunday, December 11, 2011
Add to Favorites0
Author Message
Fisherman
 Posted Sunday, December 11, 2011
Supreme Being

Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)

Group: Forum Members
Last Active: Wednesday, September 05, 2012
Posts: 11, Visits: 135
Can anyone tell me how can I use an preexistent indicator to create an other one?

For example, how should I create an indicator named "StupidInd", defined as:
StupidInd_Value := RSI_14_Value * CCI_14_Value

In fact, I do not intend to combine like this any indicators (above is just an example!), but I intend to use some to create an Buy/Sell signal indicator. In other words, I want to see no more RSI or CCI with my charts. Instead, I would like to see only the Buy/Sell indicator which may use RSI or CCI (or any other indicator I may consider useful) to provide those signals.

The problem is that I do not know how to refer to an other indicator (except moving averages) in the script of a new one.
Is no problem to get the value of certain indicator inside of a strategy, but how should I do it inside the script of an custom indicator?

Can anybody help me?
Monday, December 12, 2011 by Fisherman
black
 Posted Monday, December 12, 2011
Supreme Being

Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)Supreme Being - (90,805 reputation)

Group: Forum Members
Last Active: Sunday, July 13, 2014
Posts: 520, Visits: 1,004
Not sure what you mean, but, you can find all kinds of Indicator scripts here: http://www.actfx.com/DownloadsCategory20.aspx.

In these scripts you will find one or more lines that look something like this:

SignalLine.AddXY(SourceGraph.XValue(ValueIndex), sigval);

The variables will be different from Indicator to Indicator.

Often you can take the "sigval" variable of an indicator, and use it as part of the script in another indicator right in the same Indicator. For example. The EMA of "sigval" would be written:

newsig := (2/(Period+1)*(sigval-newsiglast))+newsiglast;

Then you would add the SignalLine part:

SignalLine.AddXY(SourceGraph.XValue(ValueIndex), newsig);

This doesn't always work. Often it will make your program run slower. But it is a start... if this is what you are talking about, that is.


Smile
Fisherman
 Posted Monday, December 12, 2011
Supreme Being

Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)

Group: Forum Members
Last Active: Wednesday, September 05, 2012
Posts: 11, Visits: 135
First of all, thank you!

You understood well what I am looking for. In the script of an custom indicator is no problem to use the value of an moving average, like in the following example:

StupidCustomInd_BasedOnEMA_Value := StupidCustomFactor * EMA(Period,SourceGraph.Count()-1);

But I did not know how to get the values of other system indicators. I hope it will be enough a clear example to get the answer to my problem. I will see what I will find at the link you gave me.

Thank you!
Fisherman
 Posted Monday, December 12, 2011
Supreme Being

Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)Supreme Being - (3,248 reputation)

Group: Forum Members
Last Active: Wednesday, September 05, 2012
Posts: 11, Visits: 135
I am afraid those scripts contain only recurrent formulas, for calculating new values of an indicator based on past values of the same indicator.

I am looking for the possibility to calculate the value of an indicator base on the value of an other (or several others).

So, I am still in the dark!
Admin
 Posted Thursday, January 05, 2012
Administrator

Administrator - (116,953 reputation)

Group: Administrators
Last Active: Friday, June 02, 2017
Posts: 548, Visits: 3,295
Dear Fisherman,

It is impossible to use indicators inside another indicator, but you can use the source that will calculate corresponding value. Please describe in details what exactly you want to create.


Best regards

-ACTFX© Forum Administrator

Similar Topics

Expand / Collapse

Reading This Topic

Expand / Collapse

Back To Top