Expert Advisors and Automated Trading - page 404

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))     {...
Hello, i would like to ask for an EA in the freelance section. which information should i not forget to provide, apart from the strategy itself? just to prevent queries. thank you! ron
Hey guys! 3 questions to coders: 1. Is it possible to code the next kind of EA and how much would you want to get for this job: a. It has to be for mt5 and/or mt4. b. It has to place market orders (not pending orders) when a certain time's candle made a certain move. c. It has to place SL,...
How to avoid such spikes in spreads? In my new EA i added blockade on all stop losses if spread exceeds the av spread by 4x. Guess it is my only idea for now on how to modify the Expert Advisor. Here on the screenshot it was 20 times the average and killed my signal: (on Roboforex acount) at 23...
Hello People Today I was running some intensive calculation with my EA. The calculation uses lots of arrays and loops and therefore the calculation uses up quite a lot of memory. I understand this. However, the odd thing but interesting thing is this: I have 8 GB of Physical memory plus virtual...
I want to subscribe to a signal from a live account to my demo account, but it looks like mql5 disabled that ability. Is there any other way to subscribe to a signal? So I could see the trades on the mql5 website and copy them manually?