Hi everyone, 

this is my first attempt to work with QC and, even though I have done all the bootcamp, and watched several videos I cannot seem to get ahold of the 30 min timeframe consolidator. 

I am trying to replicate this strategy I found online: 

Now… I have identified 2 problems. 

  1. I cannot seem to make the algo work with the 30 min timeframe. I worked with the same logic of the video on the 1h timeframe but the results were terrible. Not sure if it was because I have made some mistake while coding the algo (not an expert) or because the strategy doesn't work on the 1h timeframe. That needs further investigation and, I would say, at the moment I'm more concerned about the ability to work with 30 min timeframe. 
  2. I cannot seem to set the leverage anywhere. I tried several things but I simply cannot push the algo to invest 2% of my account with a 200 leverage. If my calculations are correct, backtesting with 5000$ starting cash, the first trade shuld be investing 0.02 x 5000 x 200 = 20000 $. But when I check… it always enters the position with 100$. In the attached algo I commented it because I didn't want to mess with it anyways. 

 

Can anyone help me please to understand what's wrong in my algo?

 

Thanks very much in advance. 

Dario

Author