Expert Advisors and Automated Trading - page 81

To post a new topic, please log in or register
Hey and good day to everyone:) My question is if its possible to build an ea that rise the position size with every new order until every position gets closed? Like 1.Trade 0,01 lot 2.trade 0.02lot 3.trade 0.03lot tp/sl hit closed.
Hi, two questions: in former days I did my work within my small EAs with the "standard" mql5 language, often encapsulated in classes/objects. Now in new projects, I thougth about using the mql5 Standard Library whenever possible (things like opening/closing orders/positions, calculating lot sizes,...
hi programmers, is there a simple way to make an EA work on GMT time using a few easy lines of code? The broker is GMT+1 but I am looking at GMT time being used for the functions of the Expert Advisor. thanks
Hi I would like to know if it is possible to get the sma value for each tic. When the bar moves I get the sma value. I use a close sma and then I noted that mql5 just get the its value each 5 minutes after the close. Sorry for my english Rogerio
Consider the following scenario; you have a class that stores a collection of values. You want to be able to filter these values, but you also want to retain a copy of the original values in order to "reset" the filter and go back to default values. Would this be the best way to implement such a...
My OS is windows 10 64 bit and meta trader is 32 bit , I need to import a dll in EA. error :  Cannot load 'C:\Users\fatbody\AppData\Roaming\MetaQuotes\Terminal\*\MQL4\Libraries\calc.dll' [193] How to create a 32 bit dll in windows 64 Which can be loaded by mt4 32 bit?
  FrameAdd using data file (20   1 2)
Hello all, According to the MQL5 Official Documentation, the FrameAdd function can be called using two different sets of parameters. The second one is actually easy to handle, as passing the data to an array is quite simple. However, I'm interested in the first method, where, according to the Docs,...
When ever I try to debug any code I get this error with ALL watch attempts. Apparently this has been a bug as far back as 2014 - I can't believe it is still here. Does anyone know of a solution to this problem? A search on google revealed a support email reply that says:- Support Team 2014.05.06 09...
cxan_96
Hello, just a quick question: In which currency is the profit returned when calling PositionGetDouble(POSITION_PROFIT)? Is it the currency of the user account or is it the quote currency? I could not find the answer in the documentation, so maybe it would be nice to add it. Greetings Christian
  how to convert MarketInfo(Symbol(), MODE_MARGINREQUIRED) to mt5 version
Hi! I'm developing an EA that works with pending orders. These pending orders get their stop loss and take profit at the start. I need to be able to know if the order has started and if either the stop loss or take profit have been triggered. The first necessity is easy: I just call...
I'm going to buy a VPS server for run Expert with these specifications : -Windows server 2003  -1 Gig RAM -CPU 1 core Are they enough for meta trader 4 ? Is windows server 2003 work without any problem?
Hi, is there a function that returns the historic profit of the day ?
I know that the 2 above is not able now. I am making an ea that must use offline chart and the ea will work more better if there are multi-agent optimization abled. But the function "offline chart" is in MT4. And the function "multi cpu agents" is in MT5.  "You can't have your cake and eat it, too."...
Does any one know how to lock an ea to a particular broker and server? Thanks.
Tired of indicators, advice on market entrances without them ?
Hello everyone. I am new to trading and would like to know if there is any way to make EA work even when MT5 platform is closed or my PC is shut down? Right now EA works only when MT5 is running and it stop working once i close the platform.
  Error (1)
Hello My EA made a error like: modification of order #63963017 sell 0.12 GBPCHF at 1.30359 sl: 0.00000 tp: 0.00000 -> sl: 0.00000 tp: 1.30249 failed [Common error] It failed to set TP how can that be normally it works just fine ! I was friday evening and it did it a couple of times... Any ideas?
Hi, I'm learning mql5 and I'm having a problem with CopyBuffer. When I change the count parameter of CopyBuffer it shows me different values and that is affecting my entry points Please, see below: int OnInit() {   sma3_handle=iMA (Symbol(),PERIOD_M5,3 ,0,MODE_SMA,PRICE_CLOSE); } void OnTick() {...
Wohoo .. sorry for the title, but I don´t know how to explain in one sentence what I am looking for ;) Well, in MT4, when a position is closed partially, MT4 creates a new position with a new ticket. The partially closed one keeps alive, is tagged as closed and the commend field contains an...
So I have this EA that displays weird characters for the options after loading, and also in the source file.. extern string ÍÀ×ÀËÜÍÛÅ_ÏÀÐÀÌÅÒÐÛ = "ÍÀ×ÀËÜÍÛÅ ÏÀÐÀÌÅÒÐÛ"; extern int Ìàãèê = 11111; extern int Òèï_Ëîòà_0_1_2 = 2; extern double Ïðîñêàëüçûâàíèå = 5.0; extern string ÏÀÐÀÌÅÒÐÛ_ËÎÒÀ =...
AbdAllah22
Hello ,  I'm making an Expert advisor including MACD In the code I depend on the value of Signal and Main line ( Histogram) in MACD in the bar 0 and bar 1 . it works perfect but sometime it comes out with strange values as -7.835123405921764e-05  , I print out those values so you can see in the...
Hi everybody, in my EA I use a lot of indicators. But by default, all used indicators automatically appear on the screen. Is this possible to switch them off and especially only some of them.
How do I place a new buy or sell order in code if conditions are met? I've tried this, but no results:  CTrade trade;    MqlTick Tick;        MqlTradeRequest myRequest;    MqlTradeResult myResult;    ZeroMemory(myResult);        myRequest.action = TRADE_ACTION_DEAL;    myRequest.type =...
Hi I want to get time portion out of datetime.. please help ie, 2017.0.15 15:30:00 to just 15:30 The idea is to close trades after 15:30. Please let me know how to achieve this. Thanks
Подозрительная финансовая активность пользователя 'goldenjet': +99, fail P to 'goldenjet', email 'accounting@reagormedia.com'!='admin@uswhss.com'
Okay so I'm very new to this and have very little understanding of trading and I'm just helping someone else out. I have a very simple task: to open a new sell or buy position if certain conditions were met, but I can't seem to work this out. I've tried googling but nothing came out. I've tried this...
in this EA my problem is that it moves the TP but doesn`t set  the SL and in the journal the value for stoploss is ZERO please help me with this. //+------------------------------------------------------------------+ //| Expert tick function                                             |...
Hi All If someone could help me achieve the below it would be great; In Ontick() I have some indicators, 1. when indicators generate Open Signal I want to book a trade and create a position 2. When indicators generate Close Signal I want to close position. Please help
I think that this code has no errors. //Codes From controlerrors.mqh  //_CountErrors is constant 150. // Error Line is 85,10 (Structure Array Error) ArrayResize(Errors,_CountErrors);  85   Errors[0].code = 10004;Errors[0].desc = "Requote"; But my ea( containing controlerrors.mqh) cannot init after...