MQL4 and MetaTrader 4 - page 379

Hi gurus, Is it possible to copy a part of a 2D array into a 1D array? So, there are: double 1DArray[100]; double 2DArray[10][100]; I want to copy 2DArray[5][all of the 100 elements] into 1DArray. Is it possible and how? Thanks
Hello everyone, I have a little problem with the moving average cross. The arrow must come out only when the Cross took place, however the code reads even the equal of moving averages. //--- indicator settings #property indicator_chart_window #property indicator_buffers 2 #property indicator_type1
Maybe this can help someone out sometime.... because I have been losing hair and sleep for that last 5 days... When you are using iCustom(Symbol(),0,"AnyIndicator",BufferNumber,Shift) .... PLEASE don't take it for granted that the indicator in question can be in a "Sub-folder" of your "Indicators"...
MT4 Platform The Mt4 Platform automatically saves objects,Indicators,Text on the chart when it is closed. When my PC Closes unexpectedly/Crashes, it doesn't save the  objects,Lines,Indicators,Text on the chart. How can I save the things I have put on the chart  eg; objects,Lines,Indicators,Text on...
As stated in the title, I'm wondering what's the different and when to use iHigh and iHighest? Thank you. 
Hi, i'm currently coding a strategy which requires a Fibonacci in a specific time range. Let say, the Fibonacci levels has to be drawn based on 1 month highest and lowest point.         int fibHigh = iHighest(NULL, PERIOD_W1, MODE_HIGH, *What to put?*, 1);      int fibLow  = iLowest(NULL, PERIOD_W1...
New article How to quickly develop and debug a trading strategy in MetaTrader 5 has been published: Scalping automatic systems are rightfully regarded the pinnacle of algorithmic trading, but at the same time their code is the most difficult to write. In this article we will show how to build...
Thanks a lot for help input double Lots           =0.1;   //at the ea start, enter the parameter 0.1 here//and then there is a "lot" in the block following, there are two assignments for"lot", then what's the 1st assignment for?double LotsOptimized()  {   double lot=Lots;   // the 1st...
Hello,  I have a problem with the virtual hosting in MT4. Aftersynchronization my EA works only until a new tick arrives, after which it isautomatically deactivated.  My approach is as follows:  1) I activate the "Auto Trading" Button  2) I prefer the EA in the chart and activate "LifeTrading...
GUYs: By "secondary encapsulated DLL", I mean I build a B.dll, which calls A.dll. I don't know the exactly tech name of that..... But when I call this B.dll, the MT4 doesn't do anything at all, and there's no error msgs in the log file. Here's the codes. I first build a helloworldDLL.dll which...
Hi friends, I want to know how can I use the data of the indicator that I developed it by myself in an EA. Suppose that I've developed an indicator which it creates numerous arrays that are so important to be used in my EA and in other word, the arrays that are created through my indicator are the
Hi.   I'm new to Forex and MT4. I've had some success with demo account, but I feel  that trading manually is not my way. I'm a software developer. I think I should use my programming skills in trading. My first approach was to learn MQL4 and try to write some advisor.    After reading documentation...
New article The checks a trading robot must pass before publication in the Market has been published: Before any product is published in the Market, it must undergo compulsory preliminary checks in order to ensure a uniform quality standard. This article considers the most frequent errors made by...
  Cannot write to file  (12   1 2)
Hello Im trying to create a .csv and .hst file. Everything seems to run fine, but I can see my files in the directory! Can you please help?
[Deleted]
Hello!  I have a wave function I would love to get coded in mql4. It is a parametric equation, x= and y=. how would I code this part? The code should draw this wave on the chart, but I am at a loss.   Thanks!  
Hey Guys, I have one problem...  My EA only works on full hours. Like from 10pm to 11pm and so on. But if I input 10:15 or 10:54 to 11 it doesn't work...   The EA should operation so that he can give me the highest and lowest price between a specified timespan. But I don't know why it only works...
Hello, Is there a possibility to subscribe to a newsletter for the http://www.metaquotes.net/en/metatrader4/news page? Thank you very much! Kind regards,
Hello, i have got an error in the line 24 :'SetIndexBuffer' - no one of the overloads can be applied to the function call    #property copyright "Copyright 2016, MetaQuotes Software Corp."#property link      "https://www.mql5.com"#property version   "1.00"#property strict#property...
[Deleted]
I am using these 2 indicators. trendplotter.mq4 http://www.forexfactory.com/showthread.php?t=46668&page=6 TrendLine Alert.mq4 http://www.trade2win.com/boards/trading-software/148012-trendline-alert-indicator-mt4.html There is a slight problem with the combination of these two. When a position is...
I understand that there is a variable called period_current which can be used in a script I have attached the same script to M1 and M5 time frame I have an alert which says "event triggered" however i am not sure if this alert was triggered by M1 or M5 Please assist
  Code help  (4)
Hi this is my 1st code I've complied without errors or warnings, however this EA code doesn't seem to work, any advise? //+------------------------------------------------------------------+//|                                                           MA.mq4...
This just started happening the other day and I can not figure out what is causing MT4 to do this. When opening a new chart through Market Watch it does not matter which currency pair I highlight and then select Chart Window, the chart that is opened is always GBPNZDi (my broker is Trader's Way and...
[Deleted]
I provide my custom comment to SendOrder() function, but when an order appears in Account History, it says in Comment "#12345, Placed by Expert". Do I need to change some other settings to make a custom comment to appear in there?
[Deleted]
hello im new at this programming mql4 i want to create a simple script, can someone help me? i need it to see 2nd last candle and open pending order 10 pips above the closing of that candle, with SL -80 pips, TP +60 pips. I have this code and it doesnt do anything #property version   "1.00"#property...
Hello, I want to trade with financial news but I need an API to connect the news on real time to Metatrader 4, do yo know a service to do that?  It is not a problem if I have to pay for this Beforehand, thank you very much.
GUYS: I try to test dll-calling in MQL4, so I build a test dll as following: #include <stdio.h> #include <stdlib.h> #include < string > #include < string .h> #include <time.h> #include <iostream> using namespace std; extern "C" __declspec(dllexport) void HelloWorld(); void HelloWorld() {
  Error 130  (6)
Hi everyone, I am a newbie to MQL. I'm trying a testing EA. I am getting Error#130. Couldn't find the reason. Pls find the code below and copy of the journal below. double Buy_Signal = 0;double Sell_Signal = 0;int i = 0;int Total_Orders = 0;int Magic_Check = 0;double Lot_Check = 1;         int...
Hello, to all, how are you, I´m not a coder.... and I have problems when I try to compile, this errors appear; delete name expected expressions are not alowed on a global scope object pointer expected void delete (int type){   if(OrdersTotal()>0){      for(i=OrdersTotal();i>=0;i--){...
Hi,     For an object of type OBJ_RECTANGLE, am unable to set the fill and tool tip property             ObjectSetInteger( chartID, objName, OBJPROP_FILL, false );             ObjectSetString( chartID, objName, OBJPROP_TOOLTIP, callOut );   Regards Vivek                
[Deleted]
hello i want to create an EA that makes a pending order, with stop loss 80 pips and take profit 60 pips. I know it looks simple, but i keep getting the error 301 i think... can someone help me?