Page 2 of 2

Re: Total Power Indicator

PostPosted: Tue Sep 24, 2013 5:00 am
by Patrick Sweet
Great work! And I appologise for the long post.

Question: what is the EMA used in the LUA for these calcs for? It makes the Bull/Bear/Power dependent on each other rather than independent of each other.

I would like to adjust Power Period line without causing subsequent changes in values for the Bull/Bear Power lines.

Apparently the EMA impacts a) when Bull/Bear Power lines actually cross based on some averaging (which may be ok) and b) it is influenced by changing the Power Period. This causes the following issue.

When I change Power Period, both the TIME at which, and the VALUE at which the Bull/Bear crosses, is impacted which means all BULL/BEAR Power values are impacted when I change the Power Period?

I understood these calcs/values to be independent.
That is, the Power Period setting would have no impact on the values of BULL/BEAR Power lines.

Shouldn't the Bull/Bear/Power calcs be independent of each other?

Check my example (please) and see if I am mistaken. Try this: Note where a BULL/BEAR cross occurs (both the time and the indicator value and price) using standard TPI settings.

Then make a significant change to the Power Period (double it) and change nothing else.

In my version, both the time and the indicator value (and this the actual instrument price) of the Bull/Bear power cross changes simply when I change the Power Period.

I appologise in advance, if this is expected. But the formulas for the respective lines given above are independent of each other.

Lookback is lookback. 100 is 100. Bear/Bull Counts are Bear/Bull counts. Power Period is Power Period.

I would like to adjust Power Period line without causing subsequent changes in values for the Bull/Bear Power lines. I think this makes more sense. Or am I mistaken?

Humbly,

Patrick

Re: Total Power Indicator

PostPosted: Tue Sep 24, 2013 10:58 am
by Apprentice
Bulls/Bears are initial data for the calculation of Power.
and this can not be avoided.
Changes in the two components are passed to Power.
Unrelated, I can make a version that use various moving averages.
With different periods for bulls and bears.

Re: Total Power Indicator

PostPosted: Tue Sep 24, 2013 1:13 pm
by Patrick Sweet
Ok. Thanks.

I understand how Power is built on Bulls/Bears.

Power = Abs (BearCount - BullCount)*100 / Lookback Period;

How does a change in Power period impact Bulls/Bears counts (in this formula)?

BearPower = BearCount*100/ Lookback Period;
BullPower = BullCount*100/Lookback Period ;

The Lua code draws on an EA in a way that I do not understand (which does not make it 'wrong', I just do not understand it and I have no alternative, and no complaints).

I just do not see how changing the Power Period would change Bulls/Bears counts or values, which is why I raise the question...as it would be good to be able to modify the Power Period in an isolated fashion...I believe.

Thanks for listening and your guidance!
Patrick

Re: Total Power Indicator

PostPosted: Wed Sep 25, 2013 4:32 am
by Apprentice
1. Power Period or EMA Period is used in the calculation od EMA
and indirectly Bulls and Bears
Code: Select all
Bulls[period] = source.high[period] - EMA.DATA[period];
Bears[period] = source.low[period] - EMA.DATA[period];


2. Change in EMA, will change the Bulls / Bear Levels,
and indirectly BullCount and BearsCount
Code: Select all
     if Bulls[i] > 0 then
            BullCount=BullCount+1;
            end
            
            if Bears[i] < 0 then
            BearCount=BearCount+1;
            end

Re: Total Power Indicator

PostPosted: Fri Sep 27, 2013 3:56 am
by Patrick Sweet
Thanks. I understand. I naively thought that Bear/Bull power was the result of simple counting and not comparison to an average and that Power peroid was a separate varialb simply comparing bull/bear. That you take the time to clarify some 'dumb' questions is GREATLY appreciated.
Patrick

Re: Total Power Indicator

PostPosted: Fri Sep 27, 2013 4:37 am
by Apprentice
Anytime.

Re: Total Power Indicator

PostPosted: Thu Jun 22, 2017 6:28 am
by Apprentice
The indicator was revised and updated.

Re: Total Power Indicator

PostPosted: Mon Feb 04, 2019 11:03 am
by amvt85
Apprentice wrote:
Total Power Indicator.png

Total Power Indicator.lua

Adaptable Total Power Indicator.lua

Total Power Indicator or Improving Elder Ray Indicator


Power = Abs (BearCount - BullCount)*100 / Lookback Period;
BearPower = BearCount*100/ Lookback Period;
BullPower = BullCount*100/Lookback Period ;

The components of this indicator we get, if we count the Elder Ray Indicator components Within the Lookback Period.

But only if Elder Ray Bull is greater than 0,
and Elder Ray Bear is less than 0

The indicator was revised and updated


Hello,

Is it possible to add two adjustable levels to "Adaptable Total Power Indicator"?

Thanks!

Re: Total Power Indicator

PostPosted: Tue Feb 05, 2019 10:51 am
by Apprentice
Added.

Re: Total Power Indicator

PostPosted: Tue Feb 05, 2019 4:49 pm
by amvt85
Apprentice wrote:Added.


All thanks mate!