MQL4 and MetaTrader 4 - page 581

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....
Is there a way to get the last order in order history?
[Deleted]
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....
[Deleted]
  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 =...
[Deleted]
  " 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.
[Deleted]
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...
[Deleted]
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.
[Deleted]
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...
[Deleted]
Whenever I click "start" my EA usually needs 2 or 3 attempts to run on the Strategy Tester. It uses multiple time frame analysis. The error I'm getting is a zero value at an iAM calculation on the very first bar (which leads to a zero divide since I'm dividing one iMA from another iMA). I have 5...
Hello to all, to get a result with a subtraction between two figures (price), use this code, but the result does not come out. The compilation of the code does not generate errors. How could I solve? thank you && MathAbs(Close[2+i] -Open [2+i]) > DojiGap2  * myPoint // this work!!            &&...
Hi, In each cycle I got different variables that stands for USD_strenght,GBP_strenght,JPY_strenght,CHF_strenght,EUR_strenght for example. These variables are numeric(integer) and can be form - to + I want to sort these five variables in order of the value that consist that variable for example...
Why the hell does MT4 make all fields blank when you just change the volume? This is very VERY anoying as it takes time to fill in those fields. Sometimes you have to be quick.. i lost a lot of potential trades because of this.
[Deleted]
It`s a double Fibo Fan indicator which works well. I am not experienced enough to change the code to have these options, could someone please help with the code? 1. to change the yellow fan color style to another one 2. the line style of the fan lines to dot or dash and, should it be possible, to...
hi guys, got dilemma with Line, seems fail to fix it   i appreciate any insight on this i can change color of line if i put it on extern section but its not very good way to change it i like to change as common style set em i mean this but i don't know how when user for exam chose a color or...
Hello, I'm currently writing a simple Expert Adviser that uses a arrow indicator.   The problem I have is that the indicator does not paint it's objects until the expert has finished... visually seen, this is of course horrific design.  Is this normal behavior? I should see it live right? Why isn't...
[Deleted]
Hi dear kind souls,  How do I update my charts to use candlesticks? I've tried clicking the button provided for it and also closed the charts and opened them up and tried again, but no results, it still uses the default line graphs. Please Help!  - Alexander 
[Deleted]
  Some questions  (3)
Hi ,    1. i accidentally closed the box on the bottom where you see details about the trade and gives you the option to close the trade aswell , how do i open it up again? 2. How can i delete a trendline or indicator from my chart? 
Hi group. I am trying to develop an MQL4 EA that places arrows on chart. When initiated, the EA will place arrows on past candles. To make it simple, the EA can be designed to place an up-arrow when the previous candle has had a 10 point move (or more) up (Close-Open>10). I am not a coder, but I am...
[Deleted]
Hi all, To open an order I use the below routine so it will try again if the order failed because of the "trade context is busy" error. But recently, orders are occasionally being missed because the initial attempt failed because of the trade context is busy error but there are no retries to be...
I am trying to find the largest fib number less than a given input.  I know that a number is a fib number if (5 * n^2 + 4) or (5 * n^2 - 4) is a square number.  Here is the function I am trying but it doesn't seem to work for me.  Can someone more experienced please take a look?  Thank you....