Bars identifier

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Bars identifier

Postby daniel.kovacik » Sun Feb 22, 2015 11:10 am

Hello,
I am looking for indicator which will change coulours of bars when there will be identified:

- inside/outsite bars
- pin bars
- shaved bars

and with possibility to make other candles grey for more visibility of those specific bars...

Thanks
Regards
DK
daniel.kovacik
FXCodeBase: Initiate
 
Posts: 163
Joined: Thu Jun 12, 2014 9:09 pm

Re: Bars identifier

Postby Apprentice » Tue Feb 24, 2015 6:49 am

Your request is added to the development list.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36341
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Bars identifier

Postby daniel.kovacik » Fri Mar 06, 2015 7:19 pm

Untitled1.png
Hi,

maybe this will help:

Code: Select all
study("CM_Price-Action-Bars", overlay=true)

pctP = input(66, minval=1, maxval=99, title="Percentage Input For PBars, What % The Wick Of Candle Has To Be")
pblb = input(6, minval=1, maxval=100, title="PBars Look Back Period To Define The Trend of Highs and Lows")
pctS = input(5, minval=1, maxval=99, title="Percentage Input For Shaved Bars, Percent of Range it Has To Close On The Lows or Highs")
spb = input(false, title="Show Pin Bars?")
ssb = input(false, title="Show Shaved Bars?")
sib = input(false, title="Show Inside Bars?")
sob = input(false, title="Show Outside Bars?")
sgb = input(false, title="Check Box To Turn Bars Gray?")

//PBar Percentages
pctCp = pctP * .01
pctCPO = 1 - pctCp

//Shaved Bars Percentages
pctCs = pctS * .01
pctSPO = pctCs

range = high - low

///PinBars
pBarUp() => spb and open > high - (range * pctCPO) and close > high - (range * pctCPO) and low <= lowest(pblb) ? 1 : 0
pBarDn() => spb and open < high - (range *  pctCp) and close < high-(range * pctCp) and high >= highest(pblb) ? 1 : 0

//Shaved Bars
sBarUp() => ssb and (close >= (high - (range * pctCs)))
sBarDown() => ssb and close <= (low + (range * pctCs))

//Inside Bars
insideBar() => sib and high <= high[1] and low >= low[1] ? 1 : 0
outsideBar() => sob and (high > high[1] and low < low[1]) ? 1 : 0

//PinBars
barcolor(pBarUp() ? lime : na)
barcolor(pBarDn() ? red : na)
//Shaved Bars
barcolor(sBarDown() ? fuchsia : na)
barcolor(sBarUp() ? aqua : na)
//Inside and Outside Bars
barcolor(insideBar() ? yellow : na )
barcolor(outsideBar() ? orange : na )

barcolor(sgb and close ? gray : na)


Thanks
Regards
DK
daniel.kovacik
FXCodeBase: Initiate
 
Posts: 163
Joined: Thu Jun 12, 2014 9:09 pm



Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 17 guests