how to calculate point value?

 

Hello


I want to make a script which open trade with stoploss of 2% of account free margin... and i dont know, how to calculate 1 point value...

for examle: OrderSend(Symbol(),OP_BUY,Lots,Ask,3,Bid- something *Point,0,"comment",255,0,CLR_NONE);

Lots is variable.

and "something" will represent how many points are 2% of account free margin.

for examle: free margin is 10 000$ so 2% are 200$ and Lots is calculated as 1/10 of free margin, so 1 Lot. In this case it should be 200 points, i think, but how to calculate it universaly for all pairs?


Thanks for help.


Maarty

 

M

Not too clear on your aims but MarketInfo should be your friend

See one example here 'MarketInfo(Symbol(), MODE_TICKVALUE) not working in all cases?'

Good Luck

-BB-

Reason: