This indicator is in relation to the Alan Kelland’s trading method called the “Alan Square” or “DaBox”. You might find a lot of information about this on the internet.
It has been coded from its description, requested in the English forum.
The indicator can plot the Alan Square from different time horizons:
Some useful infos about the indicator:
A draw tool growing in popularity is the Alan Square, named after its inventor Alan Kelland. Alan’s method is first and foremost price action. The square serves as a structure to create
The most important aspects are to look for only the best quality setups, focus on identifying follow through bars, and never fade a zone (i.e., never sell a support zone, never buy a resistance zone).
Background
Alan developed his methods trading the ten-minute all-sessions Dow Jones Index futures (YM contract). This article and the trading strategies described reflects his work using that instrument. They are suggested uses only and as such are not a complete compilation of all his methods. However, traders have successfully applied the square to the S&P futures, DAX, Crude Oil, Euro, Bund, Bond, Russell and even stocks. Similarly, while the method is geared towards 10-minute bars, Alan has also used the square on various intra-day time frames and Daily charts. You are encouraged to experiment and find what works for you.
Though Alan does not use indicators (e.g., MACD, Stochastic, etc), many traders do and have added them to their charts. Price action strategies that Alan has shared to take advantage of these opportunities, protections, and targets are summarized in this article.
Components
The major components of the Alan Square are:
1) Angulars
2) Quartiles
//PRC_Alan Kelland's Box | indicator
//07.08.2018
//Nicolas @ www.prorealcode.com
//Sharing ProRealTime knowledge
// --- settings
alpha = 100 //alpha transparency of angular lines
mymyTimeframe = 0 //0=daily , 1=weekly , 2=monthly, 3=yearly
// --- end of settings
defparam drawonlastbaronly=true
if myTimeframe=0 then
hh=dhigh(1)
ll=dlow(1)
if intradaybarindex=0 then
startbar=barindex
endif
elsif myTimeframe=1 then
if DayOfWeek<DayOfWeek[1] then
hh = Highest[BarIndex - lastWeekBarIndex](High)[1]
ll = Lowest[BarIndex - lastWeekBarIndex](Low)[1]
lastWeekBarIndex = BarIndex
startbar=barindex
Endif
elsif myTimeframe=2 then
If Month<>Month[1] then
hh = Highest[BarIndex - lastMonthBarIndex](High)[1]
ll = Lowest[BarIndex - lastMonthBarIndex](Low)[1]
lastMonthBarIndex = BarIndex
startbar=barindex
endif
elsif myTimeframe=3 then //yearly myTimeframe
if year>year[1] then
hh = Highest[BarIndex - lastYearBarIndex](High)[1]
ll = Lowest[BarIndex - lastYearBarIndex](Low)[1]
lastYearBarIndex = BarIndex
startbar=barindex
endif
endif
//horizontal
drawvline(startbar) coloured(0,0,255)
drawsegment(startbar,ll,barindex,ll) coloured(0,0,255)
drawsegment(startbar,hh,barindex,hh) coloured(0,0,255)
midpoint=(hh+ll)/2
drawsegment(startbar,midpoint,barindex,midpoint) coloured(0,0,255)
quartile=(hh-ll)/4
drawsegment(startbar,ll+quartile,barindex,ll+quartile) coloured(200,0,0)
drawsegment(startbar,ll+quartile*3,barindex,ll+quartile*3) coloured(200,0,0)
//angulars
mid=quartile*2
for i = 0 to 10 do
drawline(startbar,ll+mid*i,barindex,hh+mid*i) coloured(0,191,255,alpha)
drawline(startbar,ll-mid*i,barindex,hh-mid*i) coloured(0,191,255,alpha)
drawline(startbar,hh-mid*i,barindex,ll-mid*i) coloured(0,191,255,alpha)
drawline(startbar,hh+mid*i,barindex,ll+mid*i) coloured(0,191,255,alpha)
next
return