Darvas box theory is a trading strategy developed by Nicolas Darvas to target stocks using highs and volume as key indicators. Darvas developed his theory in the 1950s while travelling the world as a professional ballroom dancer. Darvas’ trading technique involves buying into stocks that are trading at new highs and drawing a box around the recent highs and lows to establish entry point and placement of the stop-loss order.
I was looking for Darvas’ box indicator, I managed to find the forum on the site with code exchanges for it.Not having found a provision in the library, I saw fit to share this code.
Thank you to “zen83” for its sharing
Here is the link to the discussions: https://www.prorealcode.com/topic/darvas-boxes-help/
if box=1 and (high>DownBoxe or low<UpBoxe) then
if box=0 and flag=0 and low>low and low>low and low>low then
if flag=1 and box=0 and low<th then
if flag=1 and box=0 and high<high and high<high and high<high then
return UpBoxe style (point,3) as "UpBoxe",DownBoxe style (point,3) as "DownBoxe"
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.ProRealTime ITF files and other attachments :