Download MetaTrader 5

MQL4 and MetaTrader 4 - page 958

To post a new topic, please log in or register
Hello, I'm very beginer in mql4 and I know nothing in C or C++. Anybody can help me to create function to get pip value each time to increase or decrease. Example: Entry price is 0 if (price go up for 1 pip) Pips=1 if (price go down for 1 pip) Pips=-1 In my code I have: extern int TakeProfit=30;...
if (TimeBar==Time[0]) return(0); if (TimeBar==0) {TimeBar=Time[0];return(0);}//first program run double EMA0 = iMA(NULL,0,period_EMA,0,MODE_EMA, PRICE_OPEN,0) What is Time[0]? I think it is time of the first bar. here Time[0] is 0, if it is 0 it retuns(0).it means it shops execution, when...
Dear Forum, I was thinking lately how helpful it would be if I can create composites that are not offered by my broker. For example I'd like to create chart of AUDGBP by dividing AUDUSD with GBPUSD, and then if I see some technical setup at that composite it would be much easier to bring decision...
On my usual hunt for good (and free) data sources I downloaded 7 majors "Alpari UK" data from 2001-2009 from thetrademachine.com website (http://thetrademachine.com/blog/2009/09/29/set-up-metatrader-history-data-get-90-backtesting-quality/). Problem is these files seem to have 4 digit prices, but...
here my sample code: int init() { Alert (Symbol()); return; } int deinit() { Alert ("exit"); return; } int start() { Alert("Start"); return; } when I run this code, Im getting values in alert dialog box as follows, 12:52:02 EURUSD sometime Exit. (after long gap) I...
can any body give a simple code in with the Scenario( which includes bars, lots,st,tp,etc..) Thanks in Adavance, Venkat.
Hi, I’m wondering how to determine that my mqh and libraryfiles are correct as they are not compiled? Can I run them through the compiler anyway to have my code for thesefiles checked for errors and warnings or would they generate ‘false errors and warnings’ alongwith the legitimate ones? Also I...
Hemmat
Hi I wrote a very simple EA and it works in tester properly but it doesn't work as i attach that to a chart . EA is successfully loaded but the first line of start function (a comment line) is never executed. Is there any specific Error or mistake in programing that cause such a condition ? I would...
1. NormalizeDouble(Ask,MarketInfo(Symbol(),MODE_DIGITS)) < ====> ASK WHY RESULT DIFFERENT FROM EACH OTHER?
Hi, Wondering if anyone knows how I can make a label fixed on the chart so it cannot be dragged around after double-clicking on it? Thanks, Jason
Does it make more sense to run an optimization for 2-3 years and use those settings and hope that it captures 99% of all scenarios? or Run a 1-2 month optimization every month? and use those settings for a month...and then run the optimization again? Thanks, -Ron
Gentlemen, and Gentleladies, I've been developing and backtesting an EA from scratch from some time. It will be trading strictly EURUSD to begin with. From the beginning I designed the EA to only handle one trade at a time. I now realize that I want to allow not only up to two Buy or 2 sell...
  Text vs Label (2)
What is the difference? There's no good description of each in the documentation. Can anyone elaborate please?
New article Auto-Generated Documentation for MQL5 Code is published at mql5.com: Thearticle describes the use of Doxygen to create HTML help file fromstructured comments in MQL5 code. Then it can be compiled into a .CHMhelp file by Microsoft's HTML Help Workshop. Author: Paul
Hi all, I have an idea on how to work out support/resistance lines but do not have enough time to program it. I hope those developers who offer their skills at no charge would be interested in implementing this thing to help me out in my trading as well as making a good tool for themselves. Traders...
I've read a few articles on the subject of calling the MT4 terminal from an external program, but haven't found anything yet that addresses the issue of triggering the start() function without a tick arriving. What I am trying to do is to 'wake up' the start() function so that it will invoke one of...
Hi people, I´m looking for MQL programmers in order to encode 2 workable strategies. Conditions we better discuss one to one. Skype me best on: palvort or email me with your skype and email adress and best hour to reach you in GMT format. Hope to hear soon from you! Pablo
Hi, I am new here, but I've been working on a EA project for some time. I have a question: Is it possible to overlap graphical objects (text, label etc) in a specific order. In other words, I understand there's no such property as zIndex (as in some other high level programming languages), so how...
Hello what should I change this code to display the time in seconds to 2 digit constantly? double i; int m,s,k; m=Time[0]+Period()*60-CurTime(); i=m/60.00; s=m%60; m=(m-m%60)/60; //Comment( m + " minutes " + s + " seconds left to bar end"); thanks
Hemmat
Hi I would be very grateful if somebody helps. As you probably can find out by reading my questions, i'm newbie in forex and programing it. I searched the forum with several keywords but i didn't find my answer .However i want to ask some questions that may be very elementary and hope to be...
I've searched the forum and book and couldn't find the answer. I'm trying to write a code that will do the following: if (ticket1 || ticket2 || ticket3 || ticket4) closed{   ticket5=ordersend(...) ...} how do i write it correct? which function to use? Thanks!
Hi! I'm a newcomer programmer and something is really complicate at the time. I am trying to develope a function that - in case of orders that are closed with a loss bigger than XX pips or - orders that are still opened but loosing more than XX pips doesn't allow to send other orders for 30...
I am not sure what I am doing wrong with the following code: I am trying to fill an array with a built in custom, and then call the individual array elements after the array has been filled. What am I doing wrong? Here is my code: <code> for (i=0; i<25; i++) { ADX_bull[i] = iADX(NULL,0,14...
Hi, i am having a problem with the above. Im pretty sure its due to the some sort of size limit / restriction with the string variable type in MT4 but i would welcome others thoughts. I have a single dimensional string array with 40 elements. some of these elements are set to specific values during...
Hello friends !!!!!!!! I´m very interested in patterns like this if((Open[i+1]>Close[i+1])&&(Close[i+1]>Open[i])&&(Close[i]>Open[i+1])) Swing up; if((Close[i+1]>Open[i+1])&&(Open[i]>Close[i+1])&&(Open[i+1]>Close[i])) Swing down; Combinations of closes, Openings, highs and lows....... Anyone is...
  WPR ' s MA (4)
Please Help. Moving Average value chart of WPR was not able to draw encoding. Can you help me do ? Thank You WPR' s MA
I would like to create a stop loss facility that once hit it will flat all the open position for a specific instrument, the distance should be in Pips. To make thing clearer, I am using a scale in approach,yet I want to get out of the entire position if any of the open trades pass the stop loss...
xxxxxxx yyyyy
hi, i'm currently using 1 customize indicator from others vendor and i want to retrieve the value return by this indicator, is it possible to retrieve the value?
I could figure this out on my own but it would take weeks or months of forward testing, so I'd just like to hear what your experience is with this. Some indicator driven EAs can work quite well, but its well known that these need frequent optimizing to work. So lets say I optimize on last 2-4 weeks...
I have a delicate situation. This is what I am doing. I need to place an object (let's say a SQUARE) at a certain location like x, y coordinate and NOT price, time location. It has to be at x, y location because the SQUARE's location is OUTSIDE of the time but can be within a price. This means I...