Expert Advisors and Automated Trading - page 239

To post a new topic, please log in or register
hi, i want to check if order is sell orbuy type,and this require an integer...but wich one is buy and wich one the sell? cant find infoin help file... i can not do this; if (OrderGetInteger(ORDER_TYPE)==ORDER_TYPE_BUY)??somebody can show mewhere i can find int value of a buy and sell order? the...
When I set a breakpoint in MetaEditor and click "debug" menu, a message box will be popped saying "specified symbol is not selected". And I can't find a way to go on. How to use the debugger in MT5? Is there any available document about how to debug? If I stop at function OnCalculate,when next...
need an example of buy 1.8 LOT EURUSD SL 35 pip TP 70 pip comment = kelly thankyou
how can i find a specific magic_nub order by not using loop(for) //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ int GetOrdersTotalByMagic(long const magic_number) { long order_ticket; int total=0; //--- selection through the entire history HistorySelect(0...
how to code multi-currency EA? what is the sentence? do I need to do something special ? THANKS
my EA is simple , and the  functions in my EA do not have relationship, can i coded a mql5 EA which is no Class,  inheritance and no Polymorphism , without any error? thanks 
what is the aim of mql5?   i feel lots of disadvantages of mql5, such as difficult to learn, although it being more flexible(compare with mql4) , but  Predefined variables also need to code yourself , e.g. High[3]   and the history data will not be check before backtesting, e.g. low[3] is higher...
Anybody successfully demo test MT5 with good profits??? If you are PROFITABLE and NOT secretive, what indicators and strategies do you use?
I really enjoy the new Experts list.  It makes it easy to update all EA settings in one place, but if you could add the chart to the properties title bar.  It would help to remember which EA and chart is on when updating several EA settings.  Also make a double click go to the Properties, not exit....
hello i see standard trailing stop loss 15 pips ! What is the speed of the system to check prices ? Idea is to build a new trailing ea with trailing order and trailing stop loss ! Can the system check price by seconds and how many times by seconds ? Is it possible to reduce the trailing to 1...
I have a solid set of MQL5 code and I finally have the ordering right but I'm getting a lot of the '10004' message for the trade result. I know that this is listed as "requote" in the manuals but what exactly does that mean? I have tried re-submitting my requoted orders and it usually results in...
'Create' - no one of the overloads can be applied to the function call   only can't pass compile at CiStochastic    if (m_MACD = new CiMACD)      {        m_MACD.Create(NULL, 0, 12, 26, 9, PRICE_CLOSE);        m_MACD.BuffSize(2);      }    if (m_MA = new CiMA)      {        m_MA.Create(NULL, 0, 20...
dll file ================================ library TestDll; uses ShareMem, SysUtils, Classes; function TestDll_A(i: integer): integer; stdcall; begin Result := i * 100; end; function TestDll_B(aStr: PChar): integer; stdcall; begin // StrCopy(aStr, PChar('123'));...
because my indicaotor cannot draw object under MT5, so I change to expert, so can I place 2 or more experts on the chart? thanks hongbin.fei
I cannot place a correct order using my function and the server returns a code not defined in https://www.mql5.com/en/docs/constants/errorswarnings/enum_trade_return_codes 2010.02.04 09:38:45 CheckSymbolInfo (EURUSD,H1) PlaceMarketOrder() return code: 10027 2010.02.04 09:38:45...
My robot run on H1, I want  place an indicator to other chart(h4,D1) by this expert(robot), may I use indicatorcreate?  thanks for help. 
call code: int CA_handle=iCustom(Symbol(),PERIOD_CURRENT,"Robot_Candle_indicator", 30,true,true,White,Red,White,PRICE_CLOSE); error: 2010.02.05 16:33:49 Robot (GBPUSD,H1) CA_handle = 10 error = 4103 copy from help file: ERR_CHART_NOT_FOUND 4103 Chart not found but it cannot draw...
if there is 3 charts, I want let expert bring one chart(for example D1) to front by code? how to do? thanks
In MQL4 it was possible to draw little markers in the chart when placed a Buy/Sell Orders. Is this feature transfered to MQL5 ? Somewhere in the class CChartObject ? I would like to have it as MqlTradeRequest.Color
I determinated my EA to open a position with volume = 1.0 Sometimes he will do that, sometimes he add a second order, so that the volume is 2.0 Did anyone had the same problem ? Maybe I have a mistake in my code, but with MQL4 I have not this problem.
Hi MQL5 Folks In MQL4 it was possible to detect the beginning of a new bar/candle by examining the Time[0] element and looking for it to change. But how can I detect the beginning of a new bar in MQL5 as we do not have a Time[] array available ? Any suggestions ? Thanks ukpipcatcher
I try to manage a few EA parallel for different currencies. I want to know, whether the position earns money: PositionSelect("USDCHF",1000); double USDCHF_Saldo = PositionGetDouble(POSITION_PROFIT); After the Position is closed the variable "USDCHF_Saldo" is not Null and...
When I try to attach one of my MT5 EAs to the chart I get two errors that read "Unresolved Function". I don't even get a pop-up window for input parameters. Get these errors only with one EA, all others work fine.
If my expert running on H1 chart, can I get the object(s) on H4 chart? Can you give me sample code? thanks hongbin.fei
First sorry for my defficient english, I trade with an EA inside one off-line chart in MT4 with a range bars, and runs ok. How can I do it with MT5? It's very important for me and other users with the same problem. Thanks.
This was a pain to find. Definitely a new bug. First, try this script as is. Then comment out: "Print(sad.Test())" ,and the exception disappears. Note the class that has no constructor, but has an array doesn't cause an error. Just the ones without constructor or an array causes it... class...
  Time Handling (1)
In MQL4 I could write: MqlDateTime ttt; actualDay = ttt.day_of_week; // MQL5 returns 0 In MQL5 this functioned: MqlDateTime ttt; TimeToStruct(TimeCurrent(),ttt); myDay = ttt.day_of_week;
Try it. void OnStart() { //try to run this script twice, check the Journal also. Print("This is the last time you see me"); }
[CONDITIONS] 1) Compilation is perfect without ERROR or WARNING. 2) TERMINAL Setting: ALLOW DLL 3) MQL5 Setting: ALLOW DLL 4) I use MT5 build 228 [PROBLEM] When attach to chart, terminal gives error and says that "DLL loading is NOT allow". Anybody have a clue to the problem...
I just convert my nidicator MT4 to MT5, while I try place on the chart , the log is :      What is error? How to debug and fix it?   thanks   hongbin.fei