Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Blocks Needs A Bull and Bear Balance Indicator Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
leonmiller
Posted : Sunday, September 28, 2008 3:03:34 AM
Registered User
Joined: 1/24/2005
Posts: 22
In the October 2003 issue of "Stocks & Commodities" magazine" the code for Vadim Gimelfarb's Bull and Bear Balance Indicator was provided.   Here's the link: http://www.traders.com/documentation/feedbk_docs/archive/102003/TradersTips/TradersTips.html#meta

Could you please create this indicator for Blocks.  Thanking you in advance.

Leon Miller
jas0501
Posted : Sunday, September 28, 2008 4:22:00 AM
Registered User
Joined: 12/31/2005
Posts: 2,499
The code is easily translated

Close becomes price.close
Close[1] becomes price.close(1)
etc.

just add the appropriate end if''s

The MaxList substitute function can be added in the class tab

function MaxList(a as single, b as single) as single
if a > b then
   MaxList = a
else
   MaxList = b
end if
end function


I uploaded a share called Bull Bear Indicator

Note: the code as written in the article had some C's and O's I assummed represented Close's and Open's.

I can't speak to the value or use of the indicator, I just translated it as outline in the post.




jas0501
Posted : Sunday, September 28, 2008 4:35:11 AM
Registered User
Joined: 12/31/2005
Posts: 2,499
Sorry due to pilot error the share was accidently deleted. I was attempting to replace the share as I had renamed one of the indicators and the rename function causes compiler errors.

Long story short I no longer have a chart with the indicators. So here is the code for Bull Power
'
' Bull Power
'
If price.Close < price.Open then
 If price.Close(1) < price.Open then
  BullPower = MaxList(price.High - price.Close(1), price.Close - price.Low )
 else
  BullPower = MaxList(price.High - price.Open, price.Close - price.Low)
 end if
else If( price.Close > price.Open ) then
  If price.Close(1) > price.Open then
   BullPower = price.High - price.Low
  else
   BullPower = MaxList(price.Open - price.Close(1), price.High - price.Low )
  end if
else If( price.High - price.Close > price.Close - price.Low ) then
   If price.Close(1) < price.Open then
    BullPower = MaxList( price.High -  price.Close(1),price.Close - price.Low )
   else
    BullPower = price.High - price.Open
   end if
else If price.High - price.Close < price.Close - price.Low then
    If price.Close(1) > price.Open then
     BullPower = price.High - price.Low
    else
     BullPower = MaxList(price.Open - price.Close(1),price.High - price.Low )
   end if
else If price.Close(1) > price.Open then
     BullPower = MaxList( price.High - price.Open,price.Close - price.Low )
else If price.Close(1) < price.Open then
      BullPower = MaxList( price.Open - price.Close(1), price.High - price.Low )
else
      BullPower = price.High - price.Low
end if
plot = BullPower


Here is the code for bear power.
'
' Bear Power
'
If price.Close < price.Open then
 If price.Close(1) >price.Open then
  BearPower = MaxList(price.Close(1)- price.Open,price.High - price.Low )
 else
  BearPower = price.High - price.Low
 end if
else If price.Close > price.Open then
  If price.Close(1) > price.Open then
   BearPower = Maxlist( price.Close(1) - price.Low, price.High - price.Close)
  else
   BearPower = Maxlist(price.Open - price.Low, price.High - price.Close )
  end if
else If price.High - price.Close > price.Close - price.Low then
   If price.Close(1) > price.Open then
    BearPower = MaxList(price.Close(1) - price.Open, price.High - price.Low )
   else
    BearPower = price.High - price.Low
   end if
else If price.High - price.Close < price.Close - price.Low then
    If price.Close(1) > price.Open then
     BearPower = MaxList(price.Close(1) - price.Low,
      price.High - price.Close )
    else
     BearPower = price.Open - price.Low
    end if
else If price.Close(1) > price.Open then
     BearPower = MaxList(price.Close(1)-price.Open, price.High - price.Low )
else If price.Close(1) <price.Open then
      BearPower = MaxList(price.Open - price.Low, price.High - price.Close)
else
      BearPower = price.High - price.Low
end if
plot = BearPower


1. Just add Exp MA period 20 on each.
2. do a diff indicator by dragging and dropping the bull to bear ema and select diff
3. do a Exp MA 5 of the diff



hkusp40
Posted : Tuesday, September 30, 2008 12:16:43 PM
Registered User
Joined: 7/13/2008
Posts: 35
Impressive! Got the MIDAS indicator figured out jas?
bustermu
Posted : Thursday, October 2, 2008 2:01:06 PM
Registered User
Joined: 1/1/2005
Posts: 2,645

In some circumstances, as we increase C along the price bar from L to H, BullPower - BearPower will decrease from some value at C = L and then increase to the same value at C = H.

I doubt many would find such behavior satisfactory for a Bull Bear Indicator.

Before someone else points it out, I will note that BOP will frequently decrease as C is increased. 

Any comments will be appreciated.

Thanks,
Jim Murphy 

Users browsing this topic
Guest-1

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.