Hello everyone, 

I'm new to quantconnect and have a beginner level in python coding , currently trading a cash account. 

In initializatio o set  leverag =1 with interactiv brokers mode, since I don't want a leverage in my tradin,  

when I reviewe  the orders in backtesting , I notice that sometimes the algorithm buys a quantity of stocks that has a value more than my buying power. 

How can i make my algorithm buys only within my portfolio's buying power?