python - Made a bad loop but don't know how to fix it -
got problem @ end of code. trying make loop includes 2 function. want keep them in loop until time reach bottom of data. please take look:
import pandas pd ... while true: if holding == false: buyingrate, sellingrate, holding, timein = entry(daily, hourly, d_lines, h_lines) if holding == true: profit, holding, timeout = hold(buyingrate, sellingrate, holding, timein, d_lines, h_lines, daily, hourly) print(profit) if (timein > h_lines-1) & (timeout > h_lines-1): break main() in main function, know loop not gonna work wanted. ran out of ideas how fix it.
there 2 functions in loops, entry() , hold(). output timein , timeout respectively. wish keep loop until timein or timeout reach end of data. there way achieve this?
Comments
Post a Comment