Hello everybody, i am trying to build a strategy that works on bitcoin and does the following:

enter when specific price patterns (on daily bars) and time ranges conditions are met and use stop market orders to enter at specific prices. 

exit when price and time conditions  are met. as stop losses and tp


i am attaching the project so that everyone can see it.

the code compiles without errors but it runs weird backtests, it doesnt respect the rules i gave it...

hope someone can help me out