Download MetaTrader 5

EA won't run with real money

To add comments, please log in or register
Rob Gregory
41
Rob Gregory  

Hi,

I have built an EA from scratch and am running it on AUDUSD 30M.  

I have done lots of backtesting which is fine.

Then I ran the EA on two live demo accounts on VPS servers for 2 weeks and the results are good / in line with my expectations and the backtesting.

I decided to put real funds into one of these two brokers, and have setup and ran my EA in exactly the same way and with the same settings I have used for the last two weeks of live demo trading...but so far it isnt executing ...is there something I am missing an additional permission or the like? 

‌T‌he only slight difference I can see is that my demo accounts were $10USD deposits, whereas this real account is £10k GBP and the contract size is 10000 whereas the demo was 100000. I am using code to adjust for account balance currency and contract size so I can't see this would make a difference. 

if (IsSizingOnTrigger == true) {

      output = RiskPerTrade * 0.01 * AccountBalance() / (MarketInfo(Symbol(),MODE_LOTSIZE) * MarketInfo(Symbol(),MODE_TICKVALUE) * STOP * K * Point); // Sizing Algo based on account size

      output = output * YenAdjustment; // Adjust for Yen Pairs‌

      output = NormalizeDouble(output, 2); // Round to 2 decimal place

   return(output);‌

}‌

Any help, comments or direction to resources would be greatly appreciated.

‌Tks.

whroeder1
17050
whroeder1  
  1. Don't paste code
    Play video
    Please edit your post.
    For large amounts of code, attach it

  2. Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    • Do NOT use TickValue by itself - DeltaPerLot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out
Rob Gregory
41
Rob Gregory  
whroeder1:
  1. Please edit your post.
    For large amounts of code, attach it

  2. Check your return codes and find out why. What are Function return values ? How do I use them ? - MQL4 forum and Common Errors in MQL4 Programs and How to Avoid Them - MQL4 Articles
    • You place the stop where it needs to be - where the reason for the trade is no longer valid. E.g. trading a support bounce the stop goes below the support.
    • Account Balance * percent/100 = RISK = OrderLots * (|OrderOpenPrice - OrderStopLoss| * DeltaPerLot + CommissionPerLot) (Note OOP-OSL includes the SPREAD, and DeltaPerLot is usually around $10/pip but it takes account of the exchange rates of the pair vs. your account currency.)
    • Do NOT use TickValue by itself - DeltaPerLot
    • You must normalize lots properly and check against min and max.
    • You must also check FreeMargin to avoid stop out


Thanks for the reply, i have a function to return errors so i dont think its that, what i have noticed is my custom indicators aren't loading properly, whereas they are in the demos 

2017.03.08 17:59:54.569 cannot load 'C:\Users\robgr\AppData\......\Indicators\Stochastic.mq4' 
2017.03.08 17:59:54.568 cannot load 'C:\Users\robgr\AppData\.......\Indicators\Keltner_Channels.mq4' 

Why might that be? Hosting error?

Rob Gregory
41
Rob Gregory  
Rob Gregory:


Thanks for the reply, i have a function to return errors so i dont think its that, what i have noticed is my custom indicators aren't loading properly, whereas they are in the demos 

2017.03.08 17:59:54.569 cannot load 'C:\Users\robgr\AppData\......\Indicators\Stochastic.mq4' 
2017.03.08 17:59:54.568 cannot load 'C:\Users\robgr\AppData\.......\Indicators\Keltner_Channels.mq4' 

Why might that be? Hosting error?


seems to work using
#property tester_indicator "Stochastic.ex4"
instead of 
#property tester_indicator "Stochastic.mt4"
strange how it worked for the demo, but anyway im live!
To add comments, please log in or register