Expert Advisors and Automated Trading - page 418

[Deleted]
Hello Forum, good day. I'm staring with MQL5 and tried to place a pending order, but when I ran it in the strategy tester I couldn't make any buy/sell operations. What I'm trying to do is to place a buy stop order if +DI > -DI and a sell stop order if +DI < -DI. I also tried to buy if close...
[Deleted]
Hello forum, good day. I'm new to MQL5 programming language, I come from a Web Development context and would like to start trading with MetaTrader 5. I started reading Step-By-Step Guide to writing and Expert Advisor in MQL5 for Beginners, the MQL5 Docs and a book (Expert Advisor Programming for...
[Deleted]
Hi, I have problem while I want to by any app from market. MT ask me if I really agree but the OK button isn't highlithed? What am I doing wrong? Thanks.
Hello Guys To trail a position There is alot of methods , For example you can use The Candle trailing Or The Moving Average Trailing Or The High/Low Swing Or The simple trailing :) , That's what I know .But I don't know witch is the best one ?! , Let's See whats your Best Trailng Stop Method
Hi, The strategy tester allows to visualize the drawdown as a maximum, I'd like to know if there's a way to visualize all the drawdowns for all trades, kinda an average of each trades' dd ? None of the statistics enum seems to offer such a capacity, but I may have missed something ? :/
I thought OrderProfit()=OrderClosePrice()-OrderOpenPrice(); But when I check the log file I find it seems I am wrong. Please, hope somebody can tell me the details of OrderProfit(), how to c alculate it? Thanks a lot
What is the meaning of synchronization in SeriesInfoInteger()?
  Quality control?  (5)
I had some suspicious results running MetaTester on the cloud so I decided to dig a bit deeper. Running version 1010 64 bit. The first indication was that the results shown after a strategy run was not the same as when running a single run from the list. Most of the time the results in the list...
[Deleted]
  Round numbers  (4)
Hello, how I round number to 5 decimals places? Thank
I'm currently looking into the programming needed to create a new EA. What I can't seem to find at this point is if its possible to somehow test this EA on historical charts. More for the sake of seeing how it would work and testing. Is this possible somehow? Thank you! Matt
Hi, I'm new to the EAs and the trading systems world, I wondered if its possible to run more than one EA at a time and let each EA manage only part of the money of the account. so for example if i have a 10k$ account and 5 EAs I want each one to manage only 2k$ Is it possible? and if yes how...
Hi guys, I have a program on matlab. When it finishes the calculations it produces two signals. I and 0. I is a buy and 0 is a sell. How can I incorporate this with a tradining robot on metatrader. so this robot should be able to read the buy / sell signal from matlab
Hello all; I've recently subscribed to a signal. However, it reads "signal provider has maximal volume of 10000, subscriber has 50" on my MT4 terminal. I have a standard account with 100.000 maximum volume per lot and 500:1 leverage. I have 4300 USD in my account. Signal provider has 4100 USD...
I use this function: void BuySample3() { //--- 3. example of buying at the specified symbol with specified SL and TP double volume=0.1; // specify a trade operation volume string symbol="EURUSD"; //specify the symbol, for which the operation is performed int...
Hi , I have set 2 new Eas that work properly with one broker only . It is on the 1H chart , and every tick is taken under consideration . But when I try other brokers , with MT4 , the EA enters some orders and is not entering other orders for same entry settings for the next hours....
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()&nbsp;&nbsp;{ if(PositionSelect(_Symbol))&nbsp;&nbsp;&nbsp;&nbsp; { 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-- )&nbsp;&nbsp; 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