Initiating Leverage and Margin

Hello, I have a commission scheme for my forex data, I defined the leverage method and I still don't see a change in my trade sizes, i.e. if I put an order 2x my account, the orders just get rejected. I want to know how can I set the leverage so I can place orders larger than my account value. Code Below:
class forexSpreadCommissionScheme(bt.CommInfoBase):
params = (

If you post code, you should have a look at what's right above the title of the post

For code/output blocks: Use ``` (aka backtick or grave accent) in a single line before and after the block. See: http://commonmark.org/help/

Because if you don't, code is basically non-readable.

You say 2x orders are rejected, but how leverage is configured is not known. What you exactly do is unclear, but you probably want to see this discussion (there are some others you can quickly google).