Margin Issue

 

Sometimes, I think I should have my own forum uploaded just to answer the endless questions I come up with :P


I am having trouble getting my EA to recognize free margin. To the best of my knowledge, you have to have $10,000 to purchase 10000 lots at a minimum. Is there a way in Crown Forex to get an EA to use margin and not have the 1:1 leverage?


Thank you in advance!

 

I'll upload the coding to give an idea of what I am trying to accomplish.


double Lotsize = (AccountBalance()/Aggression);
if(Lotsize < 10000) Lotsize = 10000; else Lotsize=MathFloor(Lotsize/10000)*10000;
if(Lotsize > 5000000) Lotsize = 5000000;


The goal is to have the ability to purchase 10000 lots per $1000 deposit (or $100 if possible). I have the leverage set currently to 1:100, so in theory I should only need $100 account balance to open an order of 10000 lots. Am I going wrong in my assumptions, or simply needing additional coding in the EA?

 
Do you remember 1 lot - 100000 of currency? 1 lot EURUSD = 100000 EUR
If you have leverage 1:100 to buy 0.1 lot EURUSD you have to pay 100 EUR or $132.
Reason: