Specification
I want a for-loop that gives me last 10 candles open, high, low ,close and volume as variables. (Candle1High, Candle1Low, Candle2High, Candle2Low and so onfor for last 10 candles. I want this four loop to execute on close
After wards I want to use the variables in the source code to to make a condition that will draw a horizontal line to the right of the candle that satisfied the condition.(Actually it will be two different conditions, one for a greand horizontal candle to the right and one for a red horizontal candle to the right)
one condition for green line and one condition for red line
Eg) Green Condition------If Candle1High<Candle2High then there will be a horizontal green line extending right from close of current candle
Red Condition ---------If Candle1High>Candle2High then there will be a horizontal red line extending right from close of current candle
Line will be light green or light red until that line/price is revisited by price. then it will switch colors to dark green or dark red.
Now as lines are being created(Light green) and then price revisits the place where line originated (dark green) I would like to know how far price is from the last 10 horizontal levels that havent "completed" (when light green turns dark).
This means for the last 10 light green lines and red lines I need variables that calculate how far uncompleted lines are awayfrom current close price
eg)GreenLine1Price--(this will calculate how many pips the most recent "uncompleted" light green line is from current price
eg)GreenLine2Price--(this will calculate how many pips the second most recent "uncompleted" light green line is from current price
and so on for 10 of the most "uncompleted" recent lines and also for the red lines obviously
I also need this for the time away from last "uncompleted" recent lines.
GreenLine1Time--(this will calculate how far the most recent "uncompleted" light green line is from current price and so on for the last 10 uncompleted lines (red and green)
Then I want an alert where I specify condition and alert type and it will print an arrow on current candle when condition happens
Also, I Want addition variables/stats such as Averge Time to Complete, Average Max pips away and a few more I will give you when you accept the job
I have an indi I can show to serious respondents, ask me if you have any questions