How can I use a value from 1 indicator in another indicator

Section for discussions related to indicators, use of indicators, and building of trading stategies using indicators.

Moderator: admin

How can I use a value from 1 indicator in another indicator

Postby LordTwig » Thu Mar 25, 2010 12:26 am

Hiya Nikolay,
Can I use or pass the 'value' from an indicator into another indicator?

For example, using the new 'pivot.lua' indicator that is in Beta (seeing as can use this on other timeframes), how can I just use the PP (pivot point) value in another indicator rather than having to try to combine the two indicators so that I can use it to calculate/use on other calculations in a new indicator? ie;

if PP(from beta) is >= XXXX (in new indicator) then
YYYY = 2 (in new indicator)

Obviously both indicators would need to be run together on charts and I assume that if PP value changes due to scolling back or forward that PP would be updated accordingly!

Can you post a simple example of what I need to include in a new indicator to do this and where.

Also can you maybe give an estimate on how many hours it would take to write and test same pivot.lua that is in Beta, so I can get a better idea of $$cost of such an indicator?

Cheers
LordTwig
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am

Re: How can I use a value from 1 indicator in another indicator

Postby Nikolay.Gekht » Thu Mar 25, 2010 10:38 am

Yes, surely.

In the Marketscope, when a new indicator is created, there are three "tuning" tabs: parameters, source and location.

Using the source tab you can select any of the existing sources (prices and indicators) on the chart. Looks at the snapshot in the viewtopic.php?f=27&t=486#p855, this is how I created it. And this is how the source selector looks:
choosesource.png


and this is BB applied on PIVOT. Heh... looks so funny. :-)
bbonpivot.png


You can also use other indicators in another indicator code. Use core.indicators table to list and create the indicators. An example of such indicator is also in the Rubicon CCI topic I pointed above.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: How can I use a value from 1 indicator in another indicator

Postby LordTwig » Tue Mar 30, 2010 9:03 am

LordTwig wrote:Also can you maybe give an estimate on how many hours it would take to write and test same pivot.lua that is in Beta, so I can get a better idea of $$cost of such an indicator?


I would still like an estimate $$ on this, if you could, as I may still ask to have my indicator built,
I am pretty close with it at moment but it is buggy and some calculating errors.

I probably still need another couple of months of programming experience yet.

So estimation on this which is similar type would be good

Regards
LordTwig
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am

Re: How can I use a value from 1 indicator in another indicator

Postby Nikolay.Gekht » Tue Mar 30, 2010 10:12 am

It depends on the experience. I spent one day to write and debug the existing pivot indicator for the standard levels and then 2 hours to add camarilla/woodie levels and another 1 hour to provide the "historical" mode finally. So, 1,5 of work-day.

The indicators which does not require additional data loading it's usually much faster. For example DEROSC oscillator I published the list time was made in 15 minutes.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: How can I use a value from 1 indicator in another indicator

Postby LordTwig » Wed Mar 31, 2010 12:26 am

Nikolay.Gekht wrote:It depends on the experience. I spent one day to write and debug the existing pivot indicator for the standard levels and then 2 hours to add camarilla/woodie levels and another 1 hour to provide the "historical" mode finally. So, 1,5 of work-day.


I think it is great! Much better than previously, great that you added Carmarilla & Woodie, and I like the historical or today option, well done.
LordTwig
Cheers
LordTwig
LordTwig
FXCodeBase: Confirmed User
 
Posts: 157
Joined: Fri Mar 12, 2010 3:15 am


Return to Discussions

Who is online

Users browsing this forum: No registered users and 9 guests