This concepts sounds very interesting in fact it might just turn out to be very successful too...
I see great potential here.
@Simonas Aukscionis
Or Anyone can help me :
I like this EA, and have spent days to study it (Since I am not a either professional trader or professional IT guy ) but I still can not figure out some code/function. I know some professional level Function like how to calculate "Correlation", or "ATR" is out of my knowledge, but some basic function I also fell confused about, for example:
- in Event Handling :
Why Simone set up the timer start at 1 o'clock every day? ( by Hour(0)== 1 , and by RecalculationDay =!Today() ) ..?
//+------------------------------------------------------------------+ //| Event handling fucntion | //+------------------------------------------------------------------+ void OnTimer() { if(Hour()==1 && RecalculationDay!=Day()) PrepareSymbols(); for(cnt=ArraySize(closemagic)-1;cnt>=0;cnt--) CloseBlock(closemagic[cnt]); for(cnt=ArraySize(posneg)-1;cnt>=0;cnt--) OpenBlock(pair1[cnt],pair2[cnt],posneg[cnt],magic[cnt],atrratio[cnt]); Comment("Total currently correlated symbol pairs = ",ArraySize(posneg),". Total open positions = ",OrdersTotal()); return; } - In " Lots()" define function, why he use the "500,000" to divide the AccountLeverage, rather then just use the AccountLeverage to determine lots? like this : //+------------------------------------------------------------------+ //| Calculate position volume | //+------------------------------------------------------------------+ double Lots() { double maximumRisk=0.1; int lotsDigits=MathLog10(MarketInfo("EURUSD",MODE_MINLOT)); // I deleted " (int)- " double lots=NormalizeDouble(AccountFreeMargin()*maximumRisk/(500000.0/AccountLeverage()),lotsDigits); if(lots>MarketInfo("EURUSD",MODE_MAXLOT)) lots=MarketInfo("EURUSD",MODE_MAXLOT); if(lots<MarketInfo("EURUSD",MODE_MINLOT)) lots=MarketInfo("EURUSD",MODE_MINLOT); return(lots); } - the calculation floating points which Simonas used as taking profit : -qte ouble GetFloatingUsd(int MagicNo) { double TotalUsd=0; for(int i=OrdersTotal()-1;i>=0;i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES) && OrderMagicNumber()==MagicNo) TotalUsd=(OrderProfit()-OrderCommission()-OrderSwap()); } return(TotalUsd); --- unqte ---
Hope someone can help me to figure out little about this EA. I hope if Simone can talk to me in order to help me, since I failed to add him as Friend, therefore I couldn't message him.
Have a nice day everyone.
Kind regards
Sean Lu

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Multicurrency hedge example EA (overlay hedge):
Author: Simonas Aukscionis