craze 3 posts msg #115730 - Ignore craze |
10/7/2013 8:55:21 PM
Hi. I'm trying to figure out how to add a column to my filters which indicates the percentage difference between the current price and the most recent high or consolidation. I will use this as the "reward" portion of my risk/reward ratio.
I have not entirely decided how to define this high/consolidation, but one way is that the MA(2) crossed below the MA(3).
I'll show you a chart so you can understand better.
http://imgur.com/N4Y4j5c
At the bottom there is a blue indicator for every time the MA(2) crosses below MA(3). As you can see, the last time this happened was around 8.30. I then want to get the 3 day high from that day, which is 8.40, where I (manually) drew the line.
So what I want is to automatically generate the price 8.40 from this chart, without knowing how many days ago this MA cross occured.
I tried using the days() function, but soon realised that I couldn't use the returned value from that for what I wanted anyway.
"High 3 day high VARIABLE days ago" doesn't work.
Do you see any way at all to generate the value 8.40 in this instance, without specifying a fixed amount of days (like "High 10 day high")? I want the value of the last high regardless of if it was 5 or 15 days ago.
Thank you.
|