Download MetaTrader 5
To post a new topic, please log in or register
Hello everyone!I'm trying to read all the signals in the historic of my Buffer and I wrote this code: //+------------------------------------+ //| MyIndicator()                      | //+------------------------------------+ datetime MyIndicator(int y,int j)   {    int k=0;    double MyIndicator0=0;...
Hello, How can one create an MQL4 function that accepts a parameter that is an array whose elements' datatype is unknown, such as MQL4's built-in ArraySize function? https://docs.mql4.com/array/arraysize int  ArraySize(    const void&  array[]    // checked array    );  The ArraySize function is...
Dear all, I need help to code an ea that checks the same conditions to open and close trades on as many symbols as it can from the symbols that the broker is dealing in, without opening their charts.   any help on a code that returns " Symbol" and adds it tho the Ordersend.it is a try to run the ea...
Hi All, I am new in programming and hope to get some help. I've create a simple indicator and uses iCustom in EA, and it works.  Indicator for testing purposes //---- input parameters extern int ADXPeriod=28; //---- buffers double abc[];...
Hi,  I try to use 'else {}' code when market closed just it could play. But two sounds mixed, where is a problem, please? // SELL if( sparam == "SELL GROUP" ) {     ObjectSetInteger ( 0, "SELL GROUP", OBJPROP_STATE, false );     _ticket = Order  (    "SELL GROUP"                       );...
It's possible? Please, I really need your help. 
Hi, I've been studying and coding EAs and scripts for a few weeks so I'm fairly new to MQL language. I felt a necessity to code an EA that creates a close button for every open position directly on the chart and at the right most corner of the screen, near the price level of each particular position...
I've created an EA which is supposed to open trades base on RSI values and should work on 15min time frame. But it doesn't recognize the 3AM candle on everyday so doesn't open any trade. I appreciate if someone kindly debug this code for me. If the RSI is above 50 at 3:00AM ET (15Min. candle close),...
I am very new to coding mql4, and have completed my first EA. My only problem now is that I cannot get it to open trades on more than one pair. In the EA section on the terminal next to journal, it send a stream of the error, invalid ticket for orderclose function, even though the EA opens and...
Dear all, I try to make the custom indicator about the cutting of MACD main & signal. Rule is (with the upTrend): 1. With M15 the MACD main line cut up the signal line -> sign1. 2. Sign1 = true -> with H1, check the MACD on the up or down trend (uptrend when mainH1 cut up signalH1 & oppsite). ->...
I can use ObjectGetValueByShift() to get the values of the channel's main line. But how do I get values of the second line? Is it possible at all? Calculating using linear equation formula based on time yields incorrect results due to non-linear time change in the chart.
Hi,  How can I know which part of the code is causing this Abnormal termination/timeout message?   3       07:01:15.111    EA EURUSD.lmx,M1: shutdown by timeout 1       07:01:23.244    EA EURUSD.lmx,M1: Abnormal termination 0       07:01:23.244    EA EURUSD.lmx,M1: uninit reason 9 It seems a task...
You can use the iHighest () function to find the maximum level of CCI, in a number of candles?
Hi, I've been woring on an ea with a SL function that is set after a period of time has elapsed AND an amount of pips profit it cleared.. it works for OrderModify OP=BUY but not for OP=SELL, I think I'm just missing something simple but cant seem to grasp what it is.. anyhow, here's the code;...
Hello, (first at all sorry for my not so correct English) I'm using th function FileOpen and FileWrite like this codes:   int filehandle=FileOpen("datosbloque2.csv",FILE_WRITE|FILE_CSV,"\t\r"); //  FILE datosbloque2.CSV          if(filehandle!=INVALID_HANDLE)          {...
I think I have messed up something very badly since my ea that I coded yesterday traded 36 trades GBPUSD trades in less than 1 min which would have resulted in huge losses in a real account. I've also tried it with AUDUSD where I got a pretty sweet result. After that it didn't trade at all. The time...
Hi Could anyone tell me why when I run the below in MT4 back testing, the EntryLevel and MA10 values are 0? When I attach the EA to the live chart, and I check the journal, it contains the correct values for EntryLevel and MA10, but when trying to back-test, it prints 0. It also contains the...
I have opened 3 charts  : EURUSD GBPUSD & GBPJPY. Apllied the ea to all 3 charts with different magicnumber. EURUSD & GBPUSD do take autotrades of my ea but GBPJPY doesnt. Can anybody help me why. This is an error i get from my experts tab: 2016.12.08 10:16:29.728 3 Tier London Breakout EA v1.3b...
  Trailing Stop (5)
Could someone explain how does trailing stop works in MT4? Mt4 provides minimum value as 30 points as trailing stop. What does it mean if the value is set for EURUSD at 1.07612, at what value will the sell trigger? Similarly for USDJPY it is set at 113.123 then at what value will it be sold?
I'm in a bit of confusion after looking through previous articles on encrypting MQL4 code... because it seems that many of the 'solutions' are susceptible to being cracked very easily by decompilers that are easily acquired.  My aim is to have my work not susceptible to being cracked by a decompiler...
when manual trading on mt4 you have to enter the amount of lots you wont to trade , is there a way I can get mt4 to automatically calculate the max amount of lots I can trade ?
using the command #resource  "Indicators \\ \\ myIndicator.ex4" and the code for inclusion in custom (), iCustom(Symbol(), PERIOD_CURRENT, "::Indicators\\myIndicator.ex4", 0) you can in the choice of the external parameter file .ex4?
[Help] SetLevelValue() - Switching To Other Time-frame Showing Unnecessary Lines/Maybe Lines in Previous Time-frame. This is bug in SetLevelValue(). If I switch to other time-frame there's an additional lines that appearing. For example: From M15 to D1 time-frame I see some lines from M15 that...
Anyone else having issues with EA's not loading unable to attach to chart?  I have V4 Build 1010 on Windows 10 (which did an update yesterday) and TrueTrend has gone all weird and none of my EA's will load.   Is this an MT4 problem or a Windows issue? Windows version is 1607 (OS Build 14393.187)....
  Huge Chart Discrepancy (26   1 2 3)
Hello all! I have just realised this discrepancy on my chart On the CadChf Chart, I have plotted a Trendline on the WEEKLY time frame (Picture 1). And it shows that price has Touched and Crossed the Trendline. However, when I go down on the DAILY time frame (Picture 2), the Candlesticks/Price did...
Does this MT4 platform only run Forex ?  If not, would be grateful for advice as to how to add indices. Thanks  
Hello, i am facing a weird problem with my MT4. after installing any indicator in my MT4 i am getting the texts congested like the attached pictures. i have tried reinstalling the MT4 and result remains same. if anyone is already experienced the similar problem and solved please help me out. Thank...
Hi Guys, I am trying to add some code to my EA so that it only has one trade open per currency pair at a time. I found this code online and tried it but I'm now getting the following errors:   Could anyone possibly give me advice on how to resolve this issue? void OnTick()               {      int...
Hi alltogether, I have a problem with the function Symbolselect (Symbol(),true): it always returns wrong! I'm using a specially installed Metatrader 4 without any broker connection because I solely want to backtest my strategies here with well defined history data. I do not want to pollute...
  MT4 Backtesting 'Issue' ? (13   1 2)
Hi I wonder whether someone could help me.  I have written, what I consider to be a very simple EA but when trying to back-test this EA using MT4, the backtester seems to work for a few trades and then 'stops' (by running to the end without placing any further trades). It is almost like it runs out...
/ 12345678...1180