Download MetaTrader 5

MQL4 and MetaTrader 4 - page 108

To post a new topic, please log in or register
I am trying to create an array of structs, everything I find online indicates there shouldn't be a problem with that, but I can't seem to get my code to compile when I try to do this.  Here is what I am trying to do: // Heiken Ashi Candle Structint ha = 20;   // Make this number at least 5 more than...
Can someone share with me simple code for mql4 to have a clickable button on a forex chart that when clicked places a market order? If not the code, where to go to research.  All my searches send me to mql5. 
Hi. I am trying to change the colors of an object, but the OBJPROP_BORDER_COLOR not chages...  If i try to change the Background color, works: ObjectSetInteger( 0, "my_rect_label", OBJPROP_BGCOLOR, clrGreen);   But, when try to change the Border Color... not works : ObjectSetInteger( 0,...
Yes, I know this has been posted a couple of times now, but I'm really new to trading in general and want to be sure, that I understand how the calculation of the LotSize (with tolerated Risk and StopLoss-Distance) given. This is the code I wrote (I would appreciate you to review this code and wrote...
Hi Buddies, I am newbie in world of MQL4. I am learning about MQL4 . I want some guidance regarding Trailing Stop and Breakeven. I want to know the main difference between them. Thanks , Kind Regards, traderFx89.
With my broker I can order gold and silver.     But the Indicators dont work: long test = iVolume("XAUUSD", PERIOD_H1, 0);    // returns  0   You must write: long test = iVolume("GOLD", PERIOD_H1, 0);     // returns the true value (iStochastic also returns no value)   So commercial EA Dealers will...
Hi, I would like to create an indicator using RSI.  The indicator should predict using 3 time frame viz, PERIOD_D1, PERIOD_4H, PERIOD_1H.  An arrow should be formed in the chart window if all the 3 time frame indicate buy/sell.  Can any body help me out in coding this.
I have write this simple dll in c# namespace mcMath { public class Class1 { public static double addUp(double num1, double num2) { return (num1 + num2); } }  }  when I try to import this dll file to metatrader4 I get an error Cannot load 'mcMath.dll'...
Hello I'm trying to import a function from file1.ex4 to file2.ex4    in file1.mq4 i got these lines. double getvalue(int i)   {    double r;    r = ExtATRBuffer[i];    return(r);   }     in file2.mq4 i got these lines. #import "myATR.ex4" double   getvalue(int i); #import     When I start the...
Hey, i tried to do some simple calculations. My first problem is that my Put rules do not work. Call works well. //Put Rulesif(FSG_MA < Last_FSG_MA){go_put++;drawLine_Red();}//Call Rulesif(Last_FSG_MA < FSG_MA){go_call++;drawLine_Green();}//Wirte BuffersLast_FSG_MA=FSG_MA; Furthermore, I would like...
My custom indicator has an audible and visual alert that works properly but time in the pop-up is delayed by 10 seconds. How is it possible? datetime time_alert; //used when sending alertdouble   myPoint;    //initialized in OnInitvoid myAlert(string type, string message)  {   if(type ==...
Hi Guys,   Firstly I'm so so newbie about MQL 4 and MetaTrader and try to learn how can I develop algorithmic trading as well as I have developed this simple expert advisor at below;  But When I have made test with strategy tester, I saw that opened two orders (buy & sell) at the same time....
I'd like to write an EA that looks at heiken ashi candles instead of normal candles but am not sure how to do that (I'm still pretty new at this).  Do I just write a standard EA using the Open[], High[], Low[], Close[] commands and drop it on a chart showing heiken ashi candles?  Or is there some...
Is there a way to get the last order in order history?
I recently started programming my very first EA. It may look a little confusing at first but i hope it is readable. The reason for this post is that i have encountered a problem. It comes down to this. I want to execute a buy/sell order once 3 requirements are met....
  Stop Losses (2)
Hello, Is it possible to get a value for the Stop Loss and Take Profit setting. When I put a Stop Loss it would be nice to get an info on how much money loss that represents.   Thanx 
Alright....so here is the deal.  I have written some code to render tick charts, and it works great...as long as I never close the chart/shutdown mt4/have a power outage/computer crashes/etc....  The reason any of those scenarios is a problem is...the offline chart data is wiped clean, and the chart...
Hello everybody, i am new to meta trader 4 and i am trying to obtain some indicator data from the moving average function. But i don't get some basic things.  If i use the M30 Period averaging over two periods shouldn't it be the H1 result for one period? here is my example code: Print(" M30*2 =...
  " DSS indi " (6)
Hello Guys, :) Is anyone having the indicator attatched in the pic or know where can it be find. I am talking about the red and green line indicator . Here its name is written DSS Bresert M5. thanks in advance.
Hi everyone, Im a complete newbie, taking my 1st steps into trading. I having the following problems, after downloading metatrader 4 and installing it, successfully registering a demo account. I can't seem to view anything after clicking on new order. The symbol's drop down list is empty ,...
Hi , i am very new to this site, as somebody told me that trader here really help each other. Please would anybody help me to add "input" field of this indicator Called as "ultra trend". personally i don't know about coding the indicators etc..not nothing at all there is no input filed , my main...
Is it possible to have square corners instead of rounded ones on tiled charts?
Hello Can someone tell me why the chart width is 1628 pixels wide when MT4 is opened, and after compiling, it is 1861 pixels wide using the same code. To see it I'm using Comment(ChartWidthInPixels()); Thanks int ChartWidthInPixels(const long chart_ID=0)// Get chart width in pixels function  {//---...
Hello Is there a way to detect when a trade has been opened with the standard MT4 single click buttons? I've looked through the documentation and can't see anything that relates to when trades are placed manually. A bit of code to show me how or a pointer to where I can find out will do nicely...
Hello I'm trying to left align the text in a label and have tried 2 ways of doing it without any success. The labels are in the top right hand corner and when they're all populated the text looks a mess as it's aligned to the right by default. The first try being a loop I came across. I didn't like...
I have been searching and was unable to find out... for example, when plot  line was at value 54 and now it gone down to 53 .... then the lines are connected: i want that plot lines were not connected, just they were horizontal without connecting to each other, after value changes... how to do that?...
i am having problems with calling indicators from another indicator.Can anyone help me with coding an indicator that plots the difference or sum of two indicators.i wish to use one indicator ,the first indicator will be running with period 13 and another with period 21.their sum or difference is...
this is a question.  when I try to log into my fxchoice account on my smartphone for the first time.  I only get prompted with numbers and my user name is letters.  Of course, I might be able to just change my user name to numbers however, that is like giving up.  I'm wondering why I'm not prompted...
This is the statement of a friend. I think this is a scalp EA.  I have been learning MQL4 since 4 month ago and I'd like to create an EA like this statement. Could you please give me some example files of Scalp EA like this to see the code an make this kind of EA.
for(i=0; i<200; i++){ //repaint   string barNamex = "barBodyx" + i;   string barName2 = "barBody2" + i;   int type = OBJ_RECTANGLE;   int window = 0;   datetime barTime = Time[i];   double barHigh = iMA(NULL,0,EMA1,0,MODE_EMA,PRICE_MEDIAN,i);   double barLow = iMA(NULL,0,EMA2,0,MODE_EMA,PRICE_MEDIAN...