Expert Advisors and Automated Trading - page 412

I wrote a program to use timer event. I doubt that EventSetTimer is not supported for replay. Since I didn't find any discriptions in the document, I publish this topic to get confirmation. Here are the code: //+------------------------------------------------------------------+//|...
[Deleted]
Hi, I have to come a conclusion and I have a simple question for Metaquotes guys: - Will be possible, to use external history data in MT5, within the next 1 or 2 quarter? I need a modern platform to trade and back-test my EA. MT4 is too slow when you have to back-test and optimize over 5+ years....
  OrderSend  (3)
Hi, I create an EA and i use Strategy tester to test it. I use Alpari Demo account. Unfortunately, when i want send order, i recieve an error "invalid request 10013", but when i run EA manually, a same order is sent, without error "Request completed 10009". Please help. hereafter, the send...
I've developed an EA that uses auto lot sizing, and functions on several different currency pairs. Is there a way to set up strategy tester to back test so that I'm testing all charts together, so that they'd affect each others auto lot sizing to mimic a real account?
Hello, last time i had a problem with order modify, this problem is solved, i just used the same code void OnTick()  { if(PositionSelect(_Symbol))     { if(PositionGetInteger(POSITION_TYPE)==POSITION_TYPE_BUY &&...
Hi, I figured out how to deeply reduce the memory used by the EA in a way it could be optimized with the cloud. Nobody's has provided a solution for that, here's what worked - for me. 1. Purify your code : ZeroMemory all variables when not used anymore, ArrayFree/ArrayResize all the array when...
  Trailing stop ?  (7)
There is Errors appear on the Strategy Tester journal , I didn’t understand them , The image : And this is the code of the trailing stop function void TrailingStop() { for( int b = OrdersTotal()-1; b>=0; b-- )   if(OrderSelect( b, SELECT_BY_POS, MODE_TRADES))...
  Result of EMA  (3)
Hello, i try to run my EA on a 1H chart, but i calculate an EMA on daily basis, so i use this code to get the daily EMA double EMA500 = iMA(_Symbol,PERIOD_D1,50,0,MODE_EMA,PRICE_CLOSE);double EMA501 = iMA(_Symbol,PERIOD_D1,50,1,MODE_EMA,PRICE_CLOSE); The interresting thing, EMA500...
Is it possible to set or inquire which optimization method to use? In order to use a custom method the type of method has to be set to "Custom max" on the input panel and the appropiate module has to be loaded in "OnInit" It is easy to forget one or the other
Hi, Was wondering wish is the relation between timeframe & period (of let's say an indicator). ie : Indicator : TF : M1 / Period 24 Same indicator : TF : M10 / Period : ? Or what would the M1's period corresponding to a timeframe of M10 ? 10*24 ?
Hello. I hope someone could guide me with my code below. This is different from AccountProfit for I need to track only the Equity of my account, more often to profit side before closing all positions in my portfolio. Thanks. //-------------------------------------------------------------------+ //...
I'm Searching in Code Base for Export Displaying How Many Opened Lots for Eeach Sympol . If any one know t such expert please link it and I will be highly appreciated
Hi, I updated RAM to 2*4Giga, seems only 1*4Giga used by the tester, is there anyway to make the tester use the whole memory ? It takes also only 1*4Gb when used as a remote agent, with only 1 agent created.
Hi all, i try to code an expert advisor with an automated position closing after x days. It is constructed an a daily basis and in Tradestation there is a function called "barssinceentry" for this routine. The entry is based on a moving average and the advisor have to save the date to close the...
I have a set statement in 2 variations dpending on what "mode" I am running the EA ParameterSetRange ("ModFactorTP",false,0,0,0,0); Alternative 1 //Do not optimize but set a value of "0" ParameterSetRange("ModFactorTP",true,1,-0.4,0.2) Alternative 2 //Optimize with these
Hi, The memory ontick error's solution has not been provided by no one yet. I've purified my code as possible, reduced the memory, but it's still enough to run a one-year optimization. Another error appeared (transformation error). Is there any way to solve it ? I have 4giga (ram) & can't take...
[Deleted]
Hello is possible to send variable from MQL4 to DLL ? if yes ,please help me ... how to write code ??
I create a Ea that playes with the pin bars and a SMA , but the Ea didn't see some good PinBars , and I don't know why he do that . help please .
Hello Fellow Traders. Just one interesting question about Swap rate. Using this code below, I sometimes get negative swap rate for both currency pairs. Does this make sense in terms of economics ? For example, for EURJPY, I get long swap = -0.5 and short swap = -3.0. Is this means that I will...
Hi everyone, I've tried to get myself into programming with MQL% but haven't been able to know where to start. I already have some experience with programming but cannot find enough examples to infere the application of the language. Anyways I want to ask for help because I need to program a simple...
Please help, with this code platform becomes unresponsive for 100% cpu usage Function is supposed to close one position at a time per ticket when reaching total position and profit, Please note that this came from a loop of buying and selling and there are positions always left open with positive...
Hi The signals I subscribe to don't always close due to FIFO violation - I need to change broker and migrate the subscription to the new one. I cant figure out how, I presume this can be done without unsubscribing from the signal?
Hi, Is it possible to make visible the ask/bid lines on the chart of the strategy tester, only one line to shows price by default ?
Hi Guys, I'd like to share my thought with you on some strange incident during backtesting. I noticed that when you backtest exactly the SAME Expert Advisor with THE SAME parameters, you can get completely different results between two MT4 platforms for two different brokers. Well, I can...
Hi. I have a function that keeps my platform unresponsive and 100% CPU usage each time it executes,  I hope someone could help...  Please note, I have a loop of continuous buying and selling and means that there are always positions left open at negative or positive result......
optimization process not going fine , giving error "cannot synchronize history" Symbol used : SPX500 , EURUSD ,USOil , NGAS , XAUUSD
Can anyone make suggestions ? Mean, really reliable experts. Just like prevent my money from being melted by zero rates. Thank you
Hi, I would like to know how can I get mt4 indicator's buffers, an indicator bought here on mql5.com, so the programmer will be able to read the buffer for the purpose of building an ea based on this indicator (I will use a programmer, not program the ea myself). Thanks
I'm planning on doing an EA that trades based on support and resistance levels. Will this be possible? If not what are some work arounds to get this to work?     
Hello, i use an EA and have a working Sell Order, during the sell order working i also place some Long Order, but when i want to modify my order, i get always an error. Code for Order Modify: void OnTick()  { if(PositionSelect(_Symbol))     {...