Despair

Outsidebar Indicator V2.0

Category: Indicators By: Despair Created: October 16, 2017, 4:13 PM
October 16, 2017, 4:13 PM
Indicators
8 Comments
Outsidebar Indicator V2.0

Because several persons were asking for it here an update version of the outsidebar indicator now showing a channel after an outsidebar occurred until the channel is breached by the close of a bar.

if range>=SignalbarHeight*pipsize then
 if high>high[1] and low<low[1] and close<open then
  bear=1
  bull=0
  T=high
  Bo=low
 elsif low<low[1] and high>high[1] and close>open then
  bull=1
  bear=0
  T=high
  Bo=low
 else
  bear=0
  bull=0
 endif
else
 bear=0
 bull=0
endif
offset=AverageTrueRange[14](close)*2
if bear then
 DRAWARROWDOWN(barindex, high+offset) coloured(255,0,0)
 r=255
 g=0
 b=0
elsif bull then
 DRAWARROWUP(barindex, low-offset) coloured(0,255,0)
 r=0
 g=255
 b=0
endif
if T>0 and close>T then
 T=0
 Bo=0
elsif Bo>0 and close<B then
 T=0
 Bo=0
endif
return T coloured(r,g,b) as "Top", Bo coloured(r,g,b) as "Bottom"

 

Download
Filename: OutsideBar-2.0.itf
Downloads: 295
Despair
Despair Master
Developer by day, aspiring writer by night. Still compiling my bio... Error 404: presentation not found.
Author’s Profile

Comments

getset
2 years ago
#

Hello, I like this indicator, it's small and very nice to use. So i changed the code a little bit, that the lines from the OB's aren't always going down to zero. In my opinion thats smarter to have always the levels from the past OB. Here the code: ------------------------------------- schnipp --------------------------------- if T>0 and close>T then T=T //T=0 Bo=Bo //Bo=0 elsif Bo>0 and close<Bo then T=T //T=0 Bo=Bo //Bo=0 endif ----------------------- schnapp -------------------------------------- So please give a comment if you like it. Hope it help's Thx

darbes
6 years ago
#

Hi I tried to use indicator in a strategy code. But backtesting is asking to define SignalbarHeight. How could I do ? Tku JC

Anonymous
8 years ago
#

Sorry I mean vertical red / green line

Anonymous
8 years ago
#

Found: just remove "T coloured(r,g,b) as "Top", Bo coloured(r,g,b) as "Bottom"... after return

Anonymous
8 years ago
#

Thanks for sharing! On the other hand can we remove the vertical gray lines?

simone
9 years ago
#

thanks..i try and tell you

vishal
9 years ago
#

I use mt4 This indecater work in mt4

Despair
9 years ago
#

No, it won't work in MT4. This is for ProRealTime (like everything you find on this website).

ProRealCode ProRealCode
Loading...