[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Simple code help...



PureBytes Links

Trading Reference Links

Not sure if I've lost my mind or what, but I can't seem to figure out
the best way to do this:

1. Once price penetrates the highest(high,x)[1] 
2. I'd like to look at the bar that initially created the above
referenced: highest(high,x)[1]
3. and store how many bars ago it occurred as a variable. 

SO, if a new swing high is made and 10 bars later this high is
penetrated, I would like to have the BARSAGO variable read as 10 to
later use in my code. Obviously, if it was penetrated 4 bars later it
would be 4, and so on. I hope I'm being clear enough. 

Surely, I'm making this harder than it is. Can someone help me out here
so I can stop my brain from frying?!!

Thanks,
Cody