Need 2 things to happen with this csv file. IN PYTHON!
1) Reformat timeframe to 4h instead of 1h for each row. *Note when resampling -- (Open:First occurrence, High: Highest Occurance, Low: Min occurance, Close: Last occurance)
2) Populate fib retracement data into new columns in the csv (with column name the % that the line is calulating)
-There must be a specified (and adjustable) interval for the first calculation (number of rows)
- Once the Stock breaks above or below those top and bottom lines the fib retracement is recalculated at the price with the same adjustable interval into the past as before.
- Code is provided for calculations and charting however I need those numbers in a dataframe and the recalculation to happen since we are testing longer time frames
new60minDf = [login to view URL]('60min', closed='right', base=30 ).agg(dict(open='first', high='max', low='min', close='last', volume='sum')
The resample should use a code like that but for 4 hours instead of 60 min
Need this done TODAY!