Expert Advisors and Automated Trading - page 130

To post a new topic, please log in or register
[Deleted]
Hello all, can somebody tell me why this small script returns totally wrong numbers when applying it on a timeframe > M30? void OnStart()  {   Alert((string)_Period);  }
I have made a very simple EA and it gives me notification. However, after one to two hours, it just stops and my terminal is still open. Anyone have any idea why? Other EA are also like this. My code is as following:...
[Deleted]
I would like to know, how to round a number and keep the last digit only 0 or 5. For example: Round (104,5) = 105 Round (102) = 100 Round (211,2) = 210 
about mql5 string function For example, before: string testr = "macd,9,13,26"; after: testr1="macd"; testr2=9; testr3=13; testr4=26; Here need to work with a long string with several ","(or others like "-")characters within it and then divide into different short strings, the number of short...
I am converting my code for mql4 to mql5. In mql4 i had a ticket of trade i selected it from history and was able to get pips gained. In mql5 i am able to select that order using ticket HistoryDealGetDouble(ticket,DEAL_PROFIT); but profit is 0 because ticket of deal out is different , how to get...
Hello I'm looking for a pending order EA which places an buy or sell stop order X pips away from an order which was placed by another EA. e.g. EA1 opens a long position. This leads the pending order EA to opening a sell stop order X pips away from the opening price of the long position created by...
I'm running a EA on WDO$D and when I try to get ask or bid values, to open position, both are zero! The value variable is zero when I use SymbolInfoDouble and SymbolInfoTick.    double BuyPrice(){      double value = SymbolInfoDouble(symbol, SYMBOL_BID);      if(value == 0){         MqlTick...
Hi all, I'm using the function PositionsTotal() to get the number of open positions, due to I'm using a hedge system. int num_positions=PositionsTotal(); but at each iteration it returns always 0, even if I opened two positions. What's wrong? Thanks
Hi, I try to insert my EA in the market. I get en error on Automatic validation step. The error said to me that not enough money. I deposit 11 usd and try to insert again. However, I get same error. Could you help me, please? Murat Y.
  sell a EA? (4)
hi if i have a EA made on this site and paid for it can i sell it?
I'm working on creating an EA that purchases long when the price (close) crosses above the MA line and closes the trade when the price (close) crosses below the MA line. My issue is that when I run the strategy tester, it is opening and closing the trade immediately. I've used an online generator to...
Hello, since a lot of time ( I think since the build 950 is offered ) I didn't be able to control the speed of testing at the strategy tester, you can see the problem in the picture ( the button that control the speed isn't exist ! ) so now the testing is very slow, anyone have the same problem?...
Hello everyone, I need the mql5 code to get the selected symbols of MetaTrader 5 into a string Array. The result Array will be similar to: string Symbols[]={"USDJPY","XAUUSD","EURGBP",......................................................} Can you help me with the code. Thanks
Hi guys,i'm trying to find out how to optimize my robot with backtesting,but i have a problem. i have 3 variables: X Y Z if i put X= FALSE,how can i disable Y and Z too ? because he will do the step for these variables but how i set X to false,i will not use it. there's a way to fix it ? if i put...
Im new to this forum and mql5. Let's say I want to work  (do some calculation) with last 100 candles everytime a new candle appears. MqlRates rates[];     ArraySetAsSeries(rates,true);     int copied=CopyRates(Symbol(),0,0,100,rates);     if(copied>0)       { //do something } Is calling copyrates...
Hello everyone, I would appreciate any advise or tips on this topic.  I have an older EA that i purchased long ago, thats been running fine until the last week on MT4 and im still using MT4.  Ive tried it on different VPS's and on my trading rig (was previously working flawlessly). I also had...
Hello just purchased <Deleted> i have a question on how i can keep auto trading on 247 threw the terminal. Once the ea takes profit it shuts off ?
Please guys kindly help me with steps to back test my indicators automatically.
Sometime in the last couple of months, an update to MetaEditor (now version 1562) has caused an issue with compiling MQL5 EAs. The EA compiles OK but when dropping the EA on a chart in MT5, the Inputs Tab is not visible, only Common and Dependencies. When I revert to an older MetaEditor instance...
Hi, Is there any keyword or function to identify the session start time of the Symbol. Please help Thanks!!
To call a Custom Moving Average  ............................ int avg=iCustom(NULL,pPeriodo,Indicator_Directory_And_Name,                          3,         // Period                          0,          // Offset                          MODE_SMA,   // Calculation...
hello can someone help me to limit my order per signal  im using zigzag as signal.       //input from indi      double zh=iCustom(Symbol(),0,"ZigZag.ex4",depth,deviation,backstep,1,0);      double zl=iCustom(Symbol(),0,"ZigZag.ex4",depth,deviation,backstep,2,0);      double zz=iCustom(Symbol(),0...
I need to force indicator calculate values for indicators with buffer array of quotes customized. This link show how can I export basic information of all  quote and symbols of metatrader, https://www.mql5.com/en/articles/502 but this example only show how I can export a basic data like Open, close,...
Hi guys, I'm trying to download some files by WebRequest(). The code works well to some kind of files, but when I try to download DLLs the function FileClose() clears the content of the file. It's very clear, FileOpen() creates a file with size 0kB, then FileWriteArray() fills up the file with the...
Hi everybody, I'm new to metatrader, and I had developed a EA and run a strategy tester, and all run fine until there but now, I changed an input param value to an custom indicator I use on this EA but when I click over run/debug button, strategy tester starts with the old value!!! I had looked for...
Hi guys, i need some help or script for Buystop and sellstop. i mean is when the price is move, the order of buy stop or sell stop are move too. Sorry im newbie here. Thanks
Say I have a stop loss and take profit strategy, to label the training set (historical prices) as buy or sell or do nothing, am I right that I need to know whether that historical price would lead to loss or take profit according to the stop loss and take profit strategy, and use that to label the...
i wondering aboout how to make an EA , if the order have hit a tp , it will make a same order and same tp with increases a lot . If u have a coding about this , can u shared it with me
Is there a size limit for EX5 files?
Hi all, first of all, thanks to anyone reading this that replied to my previous topic. This time I'm struggling with time management: I need to check (every 60 seconds) if the trade has reached TP or SL. For this I'm using the TimeLocal(); function: each tick I store the new value in a variable...