Open ileasile opened 5 years ago
I plan to set up a unit test for this case. If you have any suggestions on how to best set up unit tests for Pine, please let me know. Thank you very much for your PR on this! Offhand it looks nice, but I'll need to verify and test.
Short of finding a way of doing a unit test, an example of the issue in a specific chart would be helpful for verifying this issue Thanks again, Ilya
It just struck me that the title of this issue could be misconstrued as being particularly vehement :) The variable name 'AF' has another meaning in common parlance
On the first bar of a trend value of AF is inherited from the previous trend. I.e. it should be updated on the the next bar of trend, becuase EP. But it'll be taken as initial AF (0.02 insted of 0.04). It breaks the calculation.