darvas box code
- This topic has 5 replies, 2 voices, and was last updated 8 years ago by .
Viewing 6 posts - 1 through 6 (of 6 total)
Viewing 6 posts - 1 through 6 (of 6 total)
Similar topics:
Forums › ProRealTime English forum › ProBuilder support › darvas box code
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 27 28 29 30 31 32 33 |
n = 4 h = highest[n] l = lowest[n] once b = 2 v = h if h = high[n-1] and high[n-1] > high and high[n-1] > low and (b = 1 or b = 2 ) then v = h b = 0 else if l = low[n-1] and low[n-1] < low and low[n-1] < high and ( b = 0 or b = 2 ) then v = l b = 1 else v = v[1] endif endif return v |
hi this is a code for placing tops and bottoms of the darvass boxes on a chart of candlesyicks
the problem is that each time i try to paste it on the new code page the system writs “syntex error” and does not eccept the code
can you help?
what is wrong?????
Hi, this is because you are referring to future candlestick with “n-1” which is not possible in PRT, because it doesn’t make look in the past, the whole history is only loaded once.
I’m not sure that it will draw correctly what you are trying to do here, but you can replace the “n-1” to “n+1” instead and see what happen.
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 27 28 29 30 31 32 33 |
n = 4 h = highest[n] l = lowest[n] once b = 2 v = h if h = high[n+1] and high[n+1] > high and high[n+1] > low and (b = 1 or b = 2 ) then v = h b = 0 else if l = low[n+1] and low[n+1] < low and low[n+1] < high and ( b = 0 or b = 2 ) then v = l b = 1 else v = v[1] endif endif return v |
hi i did with
[n+1} as you sugested and still it gave a syntex error
can you help?
Yes, please find below the full code modified for probuilder compliance.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
n = 4 hh = highest[n](high) l = lowest[n](low) once b = 2 v = hh if hh = high[n+1] and high[n+1] > high and high[n+1] > low and (b = 1 or b = 2 ) then v = hh b = 0 else if l = low[n+1] and low[n+1] < low and low[n+1] < high and ( b = 0 or b = 2 ) then v = l b = 1 else v = v[1] endif endif return v |
hi sorry to bother you but i pasted this code on the daily chart and all i see is that it makes a blue line from left to right all over the chart
i do not know what that means?
i like a code that will draw tops and bottoms of darvas boxes on the daily jap candlesticks chart
this code doesnt do nothing///
Yes this is the code you submit to be fixed. I don’t know where it comes from, maybe from another platform I guess? There is already another darvas boxes indicator in the library:
http://www.prorealcode.com/prorealtime-indicators/darvas-boxes/
Find exclusive trading pro-tools on