Jeff Brown![]() Member ![]() Posts: 31 Joined: 1/29/2008 ![]() | I gave the revised formula a try. It produced the same results as before with the ATR embedded in the iif. The only real difference I see, looking at the generated code is that ATR is substituted with a routine called WildersVolatility (which makes sense because that's another name for ATR) while VTY_PRICE is substituted for another routine called VolatilityPriceRatio which would also make sense since it is a little more than just an ATR. I then took the code Bill provided and created an OL indicator indVTP. Plotting it on top of the VTY_PRICE(14,5), the values were identical. The VTY_PRICE indicator can't go as low as 1 for the smoothing parm so I set it to 2 while setting my new indicator to 1. This showed the slight difference between indVTP(4,1) and VTY_PRICE(4,2) as expected. I then created an ATR(4)/C indicator that should match the indVTP(4,1) and the values are identical. So, this all proves out: 1) The code Bill pulled is equivalent to the VTY_PRICE 2) ATR(4)/C is equivalent to VTY_PRICE(4,1) It doesn't explain why with ATM the use of ATR(4)/C produced slightly poorer results than using VTY_PRICE. And it doesn't explain why the introduction of iif into the formula tanked the results. Here's a quick screen shot of the indicators plotting on one chart. The interesting one is the lower one where it stacked the 2 versions of the VTY_PRICE at different settings (4,1) vs (10,5). From a ranking perspective, (4,1) is just producing higher values for ranking earlier for any symbol than the (10,5) and dropping earlier as well. There must be some benefit given the strategies. [Edited by Jeff Brown on 3/6/2018 12:57 PM] ![]() |