Expert Advisors and Automated Trading - page 88

To post a new topic, please log in or register
Hi all I am developing an EA in MQL5. I am having issue in removing TakeProfit of open position. I am using following method. CTrade trade;trade.PositionModify(symbol, 0.0, 0.0); I am getting [invalid stop] error. Please help.
Hello guys, My EA creates graphic images from some data values and operations and save them as BMP. But, as it create a lot of images, each one with around 1MB, this is consuming a lot of disk space. So, there are a way to convert these images in JPEG format? Or at least, save them directly in JPEG...
double ordertotalb_0() //countung buy orders{ double totalb=0; int i; for(i=OrdersTotal()-1; i>=0; i--) { if(OrderSelect(i,SELECT_BY_POS,MODE_TRADES)) {...
I created some .mqh files and left them in the Include folder (not a subfolder of the Include folder). I tried calling a class from the .mqh in my Expect Advisor but I keep getting a "undeclared identifier" error. Where should I place my .mqh files to be recognised by my Expert Advisor?
Hi all ! Searching a good Trailing stop for an Scalping EA, i found somes here, but i would like to know if one of us found a good one, that works fine ! if u have link, and if it's simple for configuration, will be great too ;) my goal is to have fast SL moves when doing profits (SL move each...
Hello Everyone,
Hi all, I use MT4 for automated trading since a time. Very often I heard that the MT5 is better. Has someone experience by MT5?
Hi All,  Please, I need help with my EA, attached. It only opens one order at once, even when I have multiple signals at once.  It will only open one order, and it will not open another on a different pair until the opened order has been closed. It has a Magic number, and I make sure that each pair...
I tried to use generic pointers to access the subclasses methods but I was unable to access the correct methods.  Can you help me to do it right? I expected the direct and indirect access with the same output. class Super {public:   void action(){ Print("Super");}};class A : public Super {public:...
Hello. i've got some problems. The Expert advisors are running 6 months without problem in real account. I have 10 experts advisors running the same parameter,on the same broker,same MT5 Version,Same timeframe 3 of them gave me the following error : One of them gave me this error : (USDJPY,M2) array...
Below are some logs from an indicator in the .log file: "2 01:02:27.235 Custom indicator #VISUAL ORDERS GBPJPY,M5: removed 2 01:02:27.237 Custom indicator CCI GBPJPY,M5: removed 1 01:05:09.372 Mail: invalid SMTP settings (Tools->Options->Email) 02:20:00.873 TopIndicator USDCAD,M5:...
Hallo, Can anyone give and example for closing all positions using OrderSendAsync() with TRADE_TRANSACTION_ORDER_DELETE ? Thank you for any help
//Enumerations enum DateTimeToDays     { s1DAY = 1, // 1 DAY s2DAY = 2, // 2 DAY s3DAY = 3, // 3 DAY     };// Inputsinput DateTimeToDays Inp_Pending_Expire_Date = s3DAY; // Days till Pending Order Expiration//...
Hi, everyone. I worte down this code, but it doesn't work, can you find out the mistake please? #include <Trade\Trade.mqh>CTrade trade;int MyRSIDefinition=0;int MyEMA5Definition=0;int MyEMA10Definition=0;int MyStochasticDefinition=0;int OnInit()   {     MyRSIDefinition=iRSI(_Symbol,_Period,14...
I want to write an Expert Advisor that takes values (Stop Loss, Open Trade, Take Profit) from an emailed signal and places an order. Can this be done? If yes, how can it be done?
  Stop backtest (6)
Hi guys, supposing I want to test my EA since 01/01/2015 to 08/12/2017 Supposing on 17/01/2016 there is a condition and i want my EA to fail in the test, how can i do that? In this way I can save time for the test instead waiting the end. Thanks
Hello, in MQL5 when i set this EA on MT5 in H1 and it' changes automatically timeframe (to Daily) and reset after some milliseconds. So the chart seems crazy. Not all computers have this problem, i have an i7-6700HQ where there is no problem, but on my aruba VPS and some computer there is this...
My EA wanted to query iLow, iHigh.. values and the terminal said 4073. Does anybody have any idea how to avoid this problem?  Thanks,
I need to use my own Close button in my panel. Then I tried to override CreateButtonClose(void) in Dialog.mqh file but I got this error: private member access error How can I fixed it and use my own Close.bmp instead of the default bmp file ?  #resource "\\Projects\\myPanel\\resources\\Close...
Hi, looking for an automatic trailing stop that can; - Execute console side (ie. MT4 terminal rather than setting a TS broker side), and - Will apply to any trade in any pair that is opened (either manually, via EA, or an external signal provider).  The following features would be a bonus too; -...
Hi, is there any way to compare the results from our Expert Advisor with the "buy and hold" alternative. That is, if we buy at the first position opened by our tester and then we just hold that until the end of our test (this is useful because if we are testing a bullish market we could think our...
I'm building a basic EA. I would like to enter a long position on the high of the last x hourly candle. Is the timeframe of the chart overruling the timeframe set on the EA? If in the code I calculate the high on the hourly candle (double HighEntry = High[iHighest("EURUSD",60,MODE_HIGH,48,1)]), but...
I have been using the code below to prevent portions of my code from executing more than once per bar. How can I hard code a specific duration, say 5 minutes?Int BarsCount = 0; int start(){ if (Bars>BarsCount) { //executed only once per bar BarsCount = Bars; } return(0);}Please...
Before i post a job i want to know if this is even possible. Can an EA take external triggers?  For example i use Sierra Chart to plan all my trades and am able to make my own alerts and they can be set to .wav files or to sent an email or SMS. Is it possible to create an EA with some dummy .wav...
Hi! In C programming language, one way to swap numbers is: #define swap(a,b) (a=a+b;b=a-b;a=a-b;) How can we write this in MQL5?
>_< all the procedures the EA performs to copy large quantities of buffers and prices, works fine in demo mode. BUT the same procedure fails each and every time in tester. how to copy large number of buffers/prices in tester successfully ? (~ 350,000 buffer doubles) I guess the problem is, my code...
Some time ago I had problems with MySQL and 64 bit windows. I solved it by using a 32 bit MT5 on my computer. It seems that I have gotten into some similar problem or possibly a problem with libmysql.dll Is there a 64 bit version of libmysql,dll? Dont seem to find one Tried to download a 32 bit...
Dear All, ACCOUNT BALANCE:10000. 00 USD Tried to place an oder through EA. CTrade::OrderSend: instant buy 10.00 EURUSD at 1.27443 tp: 1.28443 [not enough money] Got an error:not enough money why? please advise.
Do someone have some EA based on this Indicator? "SSL Fast Ba"
why does it shows up dpo to the chart so many times?? And what do you think is wrong? #include <Trade\Trade.mqh>CTrade   trade;void OnTick()  {double DPO [];double Ask=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_ASK),_Digits);double Bid=NormalizeDouble(SymbolInfoDouble(_Symbol,SYMBOL_BID)...