??
double buyPrice = NormalizeDouble( Buy_Here,Digit s);
Why would that be the reason for the smaller than usual lots allocated to the position on XAUUSD?
None - I'm saying that what I have shown you in that code above works on all the FX pairs perfectly... On the XAUUSD, it works perfectly but the lots allocated to the trade is like half of what it probably should be; in accordance to what % risk of my balance I intend on using per trade...
So in layman's terms; I want to risk 2%, if that trade (XAUUSD) stops out, it'll be more like a 1% loss instead.... its weird?
UPDATE: sorry I accidentally spaced out the s from Digit... So you lot could read it easier! It is supposed to be Digits (the function).
I guess what I'm trying to say is, my account being GBP denominated is having an affect on the correct lot sizing that should be allocated... where as if I had a USD account, would it not be more accurate (correct me if I am way off!).
None - I'm saying that what I have shown you in that code above works on all the FX pairs perfectly... On the XAUUSD, it works perfectly but the lots allocated to the trade is like half of what it probably should be; in accordance to what % risk of my balance I intend on using per trade...
So in layman's terms; I want to risk 2%, if that trade (XAUUSD) stops out, it'll be more like a 1% loss instead.... its weird?
double LotSize_Sell = MathFloor( risk_amount / loss_for_1_lot1/ Lot_Step) * Lot_Step ;2013.11.08 23:40:30 2013.06.19 19:00 V1 - XAUUSD XAUUSD,H1: LotSize_Sell formula: ( 200 / 23.64 / 1 ) * 1 = 8double loss_for_1_lot1 = pips_to_ssl/ ts * tv ;2013.11.08 23:40:30 2013.06.19 19:00 V1 - XAUUSD XAUUSD,H1: loss_for_1_lot1 formula: 23.64 / 0.01 * 0.01 = 23.64double pips_to_ssl = SellStopPrice - sellPrice; 2013.11.08 23:40:30 2013.06.19 19:00 V1 - XAUUSD XAUUSD,H1: pips_to_ssl formula: 1378.45 - 1354.81 = 23.64
That's within the ST though... so as you've told me before, it'll be no different on the denomination of the account....
Does that look ok to you? "23.64" points?
(Update: Just so you know, they're the prints for the sell side! Sorry if that's confused you... I didnt realise :P)
As far as I can see, that should work ok.
Only thing that is a bit odd is TV = 0.01, seems low even for a micro account and wouldn't expect that for a GBP account.
Is it a spread betting account by any chance?
double pips_to_ssl = SellStopPrice - sellPrice;Does that look ok to you? "23.64" points?
That's a change in price, not a number of points (2364.) You are not converting the change to number of points.
You don't want points in your
pips_to_bsl/ ts * tv
calculation. Rename the variable to change_to_ssl
@WHRoader - What do you mean I don't want points in that calculation? :s?
How can I apply the correct risk to the given trade based upon the distance to the stop if I don't include points in the formula...? (confused).
23.64 || 2,364 points... That's what I am trying to get my head around... To be frank, I'm convinced that I am applying too little 1 troy ounce positions because I have a GBP denominated account... I just need someone to tell me I am right / wrong from what I've shown?
No it's not a spread betting account.
@WHRoader - What do you mean I don't want points in that calculation? :s?
How can I apply the correct risk to the given trade based upon the distance to the stop if I don't include points in the formula...? (confused).
23.64 || 2,364 points... That's what I am trying to get my head around... To be frank, I'm convinced that I am applying too little 1 troy ounce positions because I have a GBP denominated account... I just need someone to tell me I am right / wrong from what I've shown?
Can you please show your code that results in this print?
double loss_for_1_lot1 = pips_to_ssl/ ts * tv ;
2013.11.08 23:40:30 2013.06.19 19:00 V1 - XAUUSD XAUUSD,H1: loss_for_1_lot1 formula: 23.64 / 0.01 * 0.01 = 23.64
Maybe you could add this print
Print("Account currency = ",AccountCurrency() );
to confirm that you are actually trading GBP in the ST because I can see no way that tv can be 0.01
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I appreciate this has been briefly touched upon in the past but I wanted to bring it up again as I am forward testing my EA with a small live account.
All the position sizing's with the currency pairs are correct. Because my account is denominated in GBP the minimum tick sizing is larger to that of a trading account that was denominated in USD (of course).
Either way, as I am trading with FXCM, the minimum position size within MT4 is "1.00" troy ounce. This roughly equates to 0.0624 pence per 1 cent move. (i.e. excluding spreads 1,200.00 > 1,200.01 = £ 0.0624).
This is the code I am using... For some reason, I am sure it is not calculating the correct position sizing...