Expert Advisors and Automated Trading - page 339

The math is simple: 155/32 = 4.84375 Not here: void OnTick()  { double tmp = 155/32; Print(tmp); MessageBox(DoubleToString(tmp,3));} I do not have any clue wath went wrong here!
"You can use the explicit casting to convert the base class pointers to the pointers of a derived class. But you must be fully confident in the admissibility of such a transformation, because otherwise a critical runtime error will occur and the mql5 program will be stopped." Is there any way to...
Please tell me meaning of column "ID" in MT5. I searched about it on the internet, docs guide. But i can't see any of my search results. Thank you very much!!!
Hello, I am trying to validate my EA for market, but each time I became an error, but in my system in on other systems it works fine. I think it is a problem of the test system if mql or have someone an idea what I'm doing wrong? I used an article for resource binding in mql: https://www.mql5...
Dear  I use the " icustom " function to invoke custom indicators and to use them in ea. What buffers should I bring when I put them in " *************** "? example) double arrup=iCustom(NULL,0,"custom indi",0,0);double arrup=iCustom(NULL,0,"custom indi",1,0);double arrup=iCustom(NULL,0,"custom indi"...
Dear I have a MQL4 EA, now i am plan to convert MQL5. i did all coding. just i can't convert only below MQL4 coding for ( int i = 0 ; i < OrdersHistoryTotal (); i++) { if ( OrderSelect (i, SELECT_BY_POS , MODE_HISTORY )) { if ( OrderSymbol () == Symbol () && ( OrderType () ==
  Signal volumes  (4)
I follow a signal but the volumes of the positions that coming to me it is diferrent from those the signal appears to his history trasaction. Why is this happens
Hello everyone! For past 2 years I've been now working on a project an automated currency trader what (should) over perform a human. My project is almost finish, whats left is to code and I need help with it. Soon my internet access and over all computer access will be fairly limited and I'm kind of...
Hi Can someone explayn to my where this comes from: input double SL = 1.23400;uint mySL = 0;void OnTick(){mySL  = uint(NormalizeDouble(SL,5)/_Point);Comment( IntegerToString(mySL));  } This code with a 1.23400 prints a value 123399 >> so i miss 1 point - i can not finger out why. Wath i am  missing...
(Please help me) Change display buy/sell arrow default in the MT5 Strategy Tester. (When Close position in the MT5 Strategy Tester) Purpose: - Distinguish the difference between BUY arrow of open position and BUY arrow of close position. - Distinguish the difference between SELL arrow of open...
  error in testing  (3)
dear all ...what means this error? 2017.04.08 21:42:25.620 TestGenerator: 917 generating errors, logged 100 first error records many thanks
I'm trying to use the following function to "see" if the last trade resulted in porfit or loss. The problem is: the function is returning "true" whether the profit is positive or not, that is, always returns true. I don't know if i'm using the wrong "get" functions or misunderstood how they work....
This is a repost, as I did first post it in the indicators section. The EA uses the PipsChartData library, which code-wise belongs to the indicator.
I'm trying to submit an EA that only operates on the M1 period, but the automatic validation always fails because it is testing on M30, H1, and Daily periods.  I even have ChartSetSymbolPeriod(0, NULL, PERIOD_M1) set to force it to run on M1 and redundant code to return in OnTick if the period is...
Hello , Is there any way to check if the output is integer or if not I want to know if this is 5 or 6 not 5.2 nor 6.7 Thank you
Hi, I have created an EA which works well for meta quotes demo account. The same EA gives error 10030, invalid filling type, when I use FxPro demo account. I tried using FOK as well as IOC, none of them work. I am using CTrade standard class library to place order. I checked with FxPro on supported...
I keep getting order filling error 10030 with FxPro. Here is my code. bool IsFillingTypeAllowed(string symbol,int fill_type)                 {                                 int filling = (int)SymbolInfoInteger(symbol,SYMBOL_FILLING_MODE);...
Hi, I have coded a basicMT5 EA which is using the CTrade class to manage trades. I am currently testingthis EA on FxPro MT5. When I open a tradeusing the ORDER_FILLING_IOC filling method, it is working fine with trade.PositionOpen. Now When I use the CTradeclass with trade.PositionClose and any of...
  Filling types  (4)
On the specification window, the filling type of a pair is designated as "all" with my broker. But, on the "new order" window, there are only two options: FOK and IOC. Can I use "return" in this case? Additionally, if available, with which function I can see the used filling type for an opened...
I trade with a certain broker using an EA and I never used to have problems. However recently my orders have been declined because of error 10030. Prior to this I used to input the order filling type as a parameter for the EA and it would work without a problem. But now even when I use...
  Choosing an EA  (6)
Dear MqL community, I am fairly new to EA trading. The problem I've encountered is to choose an EA that will suit my needs. Is there perhaps an App that can help you choose an EA ?? 
[Deleted]
  Martingale  (1)
Hello, Could anyone help me to include Martingale on my EA? Just write for me a basic Martingale code with 03 parameters: 1) Points(Pips) = EA will send order to start martingale. For example 500 poits 2) Factor = lot multiplier, if a trade was loss the next trade lot size will be lotsMultiplier
I'm clearly missing something because the timer is not beating appropriately for me in the ST. Here's my test program: //+------------------------------------------------------------------+//|                                                         test.mq5 |//|                        Copyright 2017...
Example: #include <Arrays\ArrayInt.mqh>void OnStart(){   int         arr1[];   CArrayInt   arr2;   int         nElements = 100;      ArrayResize(arr1,nElements);   arr2.Resize(nElements);      Print("Dynamic Array1 has ",ArraySize(arr1)," elements");   Print("Object Array2 has ",arr2.Total(),"...
[Deleted]
Hello , 1- If there's an EA with multiple time frames , Does it make any difference which time frame I attached it to ? 2- Something very strange happens with this EA , it depend on 3 conditions and every condition from specific time frame , it's quite strict in backtesting but in real it always has...
hi guys can anyone please add martiangle feature in Forex Real Profit EA? martiangle = true or false option,just want to see the results with martiangle Thanks << decompiled code removed by moderator >>
So I'm looking for a way to download my daily trades in pairs - Enter trade; Exit trade.  I only have 1 Entry and one Exit per trade. Looping through the deals works unless the entry and exit times are crossing. When they are, it's problematic.   I know there must be a relatively easy solution, but...
Hi everybody, How much have you made with yours EA on backtesting?  Very different to real execution? Thanks for your responses.
Hello, I would like to calculate yesterday and the day before yesterday dates. I use the below code for that. Yesterday (d_tarih) works well however the day before yesterday (e_tarih) also gives the same value. Is there a way to calculate yesterday and the day before yesterday more smartly and...
Guys, do you know the behavior of MT? let's say, for example, in my library file, I have a function, which makes something calculation, lets say: double SomethingCounter=0; double MyFun1(bool condition){     if (condition) { SomethingCounter++;     return SomethingCounter; } I include that library...