Expert Advisors and Automated Trading - page 66

Introduction Anticipating the unforeseen is a cardinal principle in the realm of automated trading. Despite the meticulous design and rigorous testing of trading algorithms, the reality remains that even the most sophisticated Expert Advisors (EAs) are susceptible to making erroneous trades
Lets say you have an array that stores 100 lot values . And you have 100 inputs of different lots. You have to create 100 inputs input Lot1; input Lot2; . . input Lot100; and then have to store them in the array LotsArray[ 0 ]=Lot1; LotsArray[ 1 ]=Lot2; . . LotsArray[ 99 ]=Lot100; I would do this
Please help How to copy from one dimension array directly into the second dimension array of multi-dimension array, without using looping ?? Or is it possible to copybuffer from indicator result into the second dimension of multi-dimension array ?? Thank you
I have an EA based partly on a martingale system. The issue I have seen whilst testing on some platforms, e.g. ICMarkets is that orders can be triggered incorrectly on receipt of an "Old Tick". Here is an example from a debug comment I placed in the code: As you can see here the Ask is completely
I want to control the timeframes that an object would be visible on, however the timeframes are not fixed. Normally I would write: ObjectSetInteger ( 0 , name, OBJPROP_TIMEFRAMES , false , OBJ_PERIOD_H1 | OBJ_PERIOD_M15 ); But now, the system might require the object to become visible in 3 or 4
Hello Friends I am stuck with a following if condition!!! if (!(cCPRM15.rangeR2_R1(CPRD01,j,k) || cCPRM15.rangeR1_Top(CPRD01,j,k))) return ( false ); I want to return(true), if either one condition is true, else return(false). I have tried using && operator too, but it is always returning [false]
greeting to all please i want very simple code when price go up for 5 points place a buy order take profit after 20 points and stop after 15 points when price go down for 5 points place a sell order take profit after 20 points and stop after 15 points without indicator ***
  Fastest broker  (2)
I’m in need of a really fast broker and vps. Today I’m using mql vps hosting and has about 0.7ms ping. Is there any way to get the ping down even more with no other broker
Hello,   does anyone know how does the experation function fo pending orders Works in MQL5?   i found there is an Void https://www.mql5.com/en/docs/standardlibrary/expertclasses/expertbaseclasses/cexpertsignal/cexpertsignalexpiration    but also you have the constant from the order Send Function...
Hi, I'm using the Strategy Tester to debug an MQL5 EA strategy that inadvertently issues many PositionModify commands - the journal gets full of server messages and its hard to see the wood from the trees. When using the Strategy Tester, is it possible to (temporarily) block server messages - I just
Would anyone know how to incorporate into a breakeven price calculation the swaps of the given positions? I am working on the function below, which calculate the BE price of positions of a given pair in a given direction, but I have not figure out a simple way to add the losses from swaps into that
  2 Time Frame EA  (4)
Hi everyone, do you have any idea why I get this error when backtesting? Best Reguards, ZeroCafeine. int OnInit () { Handle_MACD_D1 = iMACD ( _Symbol , PERIOD_D1 , FastEMA_D1, SlowEMA_D1, SignalSMA_D1, PRICE_CLOSE ); Handle_MACD_H4 = iMACD ( _Symbol , PERIOD_H4 , FastEMA_H4, SlowEMA_H4
Hello 1) I have seen some websites selling top ranked MQL5 EAs for 30USD and I heard from some people they work perfect. 2) I have been told that given mql5 market EA can work during backtest without purchase they can formulate a dummy MT5 where the EA thinks it is in testing mode but it is actually
Hello everyone, I am encountering a problem with the backtests of several Expert Advisors (EA) on MetaTrader 5 using the Libertex broker. I have found that neither the EAs I have developed nor the ones I have downloaded (even those highly rated on the MQL5 market) execute backtest trades, while the
Hello everyone, before you tell me, I've already been searching the forum on the subject, but I can't find anything that works for me. Since I am only going to Having only one trade open at a time, I don't need to factor in margin or anything like that I need to know how the lot size is calculated
Hello, where can I download the library from #include <TradeConstants.mqh>,because it's not present in my include. Unfortunately, I can't find out where to find it. Please help
Microsoft Factory Class Warning: A pointer called "m_pMainWnd" was detected in a function called "Run()" of the class "CWinApp". CS 2 11:19:44.360 MFC Warning: m_pMainWnd is NULL in CWinApp::Run - quitting application. Something called debugger exist: Best Regards
Hi, I'm new to Forex, and I'm adapting my Day-trade EA to Swing trade on Forex (Exness Broker). What I know is that Forex closes during weekend, right? I don't really understand if I can't operate during weekends. If so, That would result on false results and reports while I'm doing backtests. As
Hi, Is it typical that optimization gets very slow when using a custom made indicator? I made a simple indicator and use it in my EA and the optimization is soo slow :( I also made EA that uses two simple moving averages and optimizing it is much faster. My custom indicator is not complex and I've...
What does it mean
Hello, I have developed an EA that relies on price behavior around moving averages. I am however unable to test this on the strategy tester. With different timeframes and currency pairs, the outcome is the same. No trade is executed and the journal returns the details in the attached. Anyone please
Hi all. I just got my first EA up and running and I am finding that the indicator values lag about 5 minutes behind the values displayed on the chart. I see a bit of chatter about this. Is this a common thing? I saw one post that suggested coding a custom indicator. I managed to find the code for
Yet another quirk of MT5, with exactly the same conditions the visual tester does the job right while the non-visual tester opens a position when it shouldn't. I'm having a very deep look into this and there's no "randomness" in the code. - I tried all modeling methods (everytick, 1 min ohlc, etc..)
Hi. I am new to MQL5 so I apologise if I don't describe my issue well or use the correct terms. I am trying to get Indicator values using iCustom and CopyBuffer, but I am just getting zero values. I am working on an Expert Advisor that uses three Indicators: TEMA (9), Vwap bands (9), and CCI (9)
CopyTickRange not working for demo account but same timerange of ticks can be requested through symbols,view
Hi! Please see subject. I occasionally see scores in the 90s, and curious to know if 100 is the max, or it it's possible to break beyond 100. Thanks. 😊
All the testing parameter was same. except the modeling. I'm fully confused with these upside-down results. Can someone please tell me why is that? Results of Modeling - "Every Tick" Results of Modeling - Every Tick based on real ticks
  Margin Check  (2)
Hello! OrderCalcMargin() cannot be used on indicators . How can I go around this? Thanks
hi, i'm new here creating a new topic, but i search a lot of things. In special this problem if can we help me void RangeBreakout::TotalProfit() { floatingPNL = 0 ; int total_positions = PositionsTotal (); for ( int i = total_positions - 1 ; i >= 0 ; i--) { ulong ticket =
Hi, I'm still using MT4 instead MT5.  I have try many times to perform backtest and optimisation test. Once optimization test have done it will show tick graph and result finding on profit, drawdown, risk and etc. How to use/implement the result into real setting EA?