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/
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 |
// //============================== Indicateur if box=1 and (high>DownBoxe or low<UpBoxe) then box=0 flag=0 endif if box=0 and flag=0 and low>low[3] and low[1]>low[3] and low[2]>low[3] then th=low[3] flag=1 endif if flag=1 and box=0 and low<th then flag=0 endif if flag=1 and box=0 and high<high[3] and high[1]<high[3] and high[2]<high[3] then DownBoxe=high[3] UpBoxe=th box=1 endif once DownBoxe=undefined once UpBoxe=undefined //============================== Fin return UpBoxe style (point,3) as "UpBoxe",DownBoxe style (point,3) as "DownBoxe" |
Share this
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 :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
bonjour,
bravo à l’auteur pour cet indicateur visuel sur le graphique, il nous reste à valider un filtre qui nous permet de viser la bonne entrée et la bonne sortie..