Expert Advisors and Automated Trading - page 330

I was looking for a way to create a combo box for the input variables. I came across the following example: enum __in{ _p1, // value 1 _p2, // value 2 _p3, // value 3 _p4 // value 4 }; extern __in check = _p1 It works beautifully and I have adapted it for my needs. My question is... What is
Hi, I used ObjectCreate to put some objects on the chart within the strategy tester. However, TimeCurrent and the bid price seem to have no effect. I want the objects to move with current as well as the bid price but they remain static. Any ideas? void OnTick() {    ObjectCreate(0,"test9999"...
i Got a problem when i test my EA at backtesting. anyone help me about this error? Label Delete: failed to delete a text label! Error code = 4202 Regards.
hi guys, it happens my pc get frozen and i ve forced to reboot it... Anyone has experimented it? Im using EA on MT5 Thanks
Hello, im trying to use this indicator -> https://www.mql5.com/en/code/11432 inside of my EA, but via iCustom i cannot obtain the candle result, how i can export data from this indicator to the iCustom ? if possible can you provide me an example of iCustom call ? I tried to add an buffer and store
I want expert's properties appears when user clicks on the properties button on the chart, i know how to design and code it, i just don't know what function shows EA's properties, can someone help me please
I need help on this. I want to add some coding to my EA. I need to add new same order as previous when equity drop to certain amount. Really appreciate your help.
  Heikin Ashi  (1)
Can anyone tell me how to detect when the trend direction changes from within an EA?
My cashmarket trailing stop applied to Forex is failing, sending this error code: 10036 - Invalid return code of the trade server Anybody with some clue? Thank you. Daniel
double margin = AccountInfoDouble(ACCOUNT_BALANCE);double tickValue = SymbolInfoDouble(pSymbol,SYMBOL_TRADE_TICK_VALUE);double tradeSize = margin / tickValue; Initial money: 100,000 SYMBOL_TRADE_TICK_VALUE = 1 SYMBOL_TRADE_TICK_SIZE = 0,00001 Ask Price = 1.11225 Running the code above I'll get a...
[Deleted]
I wanted to try optimization in the cloud today, deposited 10$, setup all optimization parameters, turned off local cores and local network and when I hit start I get an error 2017.05.21 14:27:26.124 Tester  no agent is ready, optimization not started The optimization does work using local cores,...
Say I have an EA that execute based on tick level (Bid Ask) information, is there a way to backtest it with tick level information in metatrader? There are two problems: a. it seems metatrader only supports 1 min chart and tick level are simulated (not accurate) b. where could I get the tick level...
do some body have the template for inserting magic number in EA i have an EA and i want to insert EA to avoid closing my other open trades
[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]
  How to Normalize  (3)
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...
  Pending Order EA  (3)
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, 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?
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
[Deleted]
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
  auto trading 247  (1)
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...