Nice work, but doesn't multi-instrument lose it's meaning when you trade coorelated pairs with the same setups? I would expect their drawdowns to occur around the same time and that may be an issue. Unfortunately though, all currency pairs are so corellated this may be unavoidable. I actually trade the EUR/USD GBP/USD pairs together as well but with one I use a trend follower with the other I use a reversal, tops and bottoms type of EA.
request.volume = Money_M();
This EA is a great example of organized code and has great comments. I did have one question however pertaining to your lot size function called Money_M(). What and where is the decision tree behind this?
I tried to search the support site but could find no reference and it did not appear to be linked to an associated class.
request.volume = Money_M();
This EA is a great example of organized code and has great comments. I did have one question however pertaining to your lot size function called Money_M(). What and where is the decision tree behind this?
I tried to search the support site but could find no reference and it did not appear to be linked to an associated class.
double Money_M() { double Lots=AccountInfoDouble(ACCOUNT_FREEMARGIN)/100000*10; Lots=MathMin(5,MathMax(0.1,Lots)); if(Lots<0.1) Lots=NormalizeDouble(Lots,2); else { if(Lots<1) Lots=NormalizeDouble(Lots,1); else Lots=NormalizeDouble(Lots,0); } return(Lots); }
This function is used to calculate the size of trading lots.
double Lots=AccountInfoDouble(ACCOUNT_FREEMARGIN)/100000*10;
In this string the calculated size of trade lots. The calculation is carried out on free money (ACCOUNT_FREEMARGIN). Risk = 10% of available free funds.
Lots=MathMin(5,MathMax(0.1,Lots));In this line is executed the normalization of the trade lots. 0.1 <= Lot <= 5.0
Hi, I'm french and my english is bad sorry^^.
If it does not place any trade or you have an error : [invalid request] , you must add : " request.type_time = ORDER_TIME_GTC; " in the intialization of the MqlTradeRequest structure for every order.
I have trouble when attach this EA. In Expert tab appear this message :
2012.07.09 11:31:16 exp_tema cannot load indicator 'Triple Exponential Moving Average' [4302]
What wrong? Thank you- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Multik:
The Multicurrency Expert Advisor is based on the idea, presented in the article Creating an Expert Advisor, which Trades on a Number of Instruments.
It trades on the EURUSD and GBPUSD daily bars. It buys when MA is upwards, and sells when MA downwards. It uses a special function for money management.
Author: AM2