Dear community, I’ve been trying hard to find a code, that would try to substitute the incredible results reached by http://www.prorealcode.com/prorealtime-indicators/darvas-boxes/. My code to get the best results out of it was as follows:
DEFPARAM CumulateOrders = False
indicator1 = highest[250](close[1])
IF close CROSSES OVER indicator1 then
BUY 1 LOTS AT MARKET
endif
// Relative Strength according to Levy
indicator2 = Average[125]
if close CROSSES UNDER indicator2 then
sell at market
endif
Have you find formulas to optimize Darvas boxes that can be automatically traded on PRT?
I appreciate your help in advance!
Many thanks to all of you!
Best regards,
Philip
Hi
Unfortunately unless I am mistaken, the darvas box code uses the DPO indicator (detrended price oscillator), and this DPO uses future data for past candlesticks. However it cannot achieve this for the most recent candlestick because using “future within historic of data” is one thing, but using “unknown future beyond present time” is another… This makes DPO (and therefore Darvas box) unsuitable for automated trading.
There is a second DPO calculation not using future data, but it gives very different results. Somebody wanted to try it on the french PRC forums, but we never heard back from him.
I see, I see. I think the code that I inserted here works also very well, but it’s a long run strategy compared to the DPO measurement. And somehow I am unsure whether there could be improvements to provide for short-term strategies.