Download MetaTrader 5

MQL4 and MetaTrader 4 - page 296

To post a new topic, please log in or register
hey :), i try to make a bot (EA). he shoud use a indicator like this how i can buy an (SO) option at the (red) arrow?
This was thankfully just a Demo acct. Test when this happened. What happened was, I was doing Sunday night on a fairly advanced EA on multiple currency pairs. It was set to trade on just one microlot or .01 lots. Has been working fine until last night for some reason on the GBPUSD it did several...
  new Compiler (7)
I have recently tried to modify an existing MQ4 indicator and with the new (joint MQL4/MQL5) compiler have masses of errors produced from a program that has worked perfectly well when compiled with the old MQL4 compiler. Below is an example: #define ACR.Time     0  // Array Copy Rates#define ACR...
Hi! I'd like test whether the OrderComment is a convertible from string to a number or not, but I can't find anything like an IsNumber() function. Is it possible to get around this? Basically I need the code to test wehter OrderComment() is of type "1.3650" or "BALANCER" in order for the code to...
Hello Please i need help coding my EA to work with my broker ( no ECN broker ) i'm a begginer on mt4 programming could anyone explain to me what should i do ?!  ( the EA is attached ) Thanks a lot
Hello, I have different patterns for buy signals, i'm trying to save them in an array. The array would have "0" as value for each bar, except +1 when it's a buy signal bar and -1 for sell signal bar. So i did : SignalHisto[i] = 0; by default, and = 1 or = -1 when i have my signal bars. Now i try to...
Hello, im new in coding with mql4 . So my problem is that everytime i start my Expert Adivsor via Debugger , he automaticly select the Symbol EurUsd. How can i change these ? I tried to Change over Strategie Window but nothing happend. Pls Help me :)
Hi Everyone, I am writing an indicator based on 2 variables. The rule is that: Whenever variable1 (take value 0 and 1) turns to 1 from 0. find the very first bar (including this turning bar) that has variable1 =1 and varibale2=100. It is like looking back, and I choose to look back 5 bars. My...
Hey guys, I want to do a simple thing.. Just move my stop to breakeven when the trade is the same amount of pips in profit. That's all. And whatever I try, I always get error 130. I don't understand why this is an invalid SL? Can anyone help? void OnTick()  {//---   for (int i = OrdersTotal()-1; i...
How do I issue the SendOrder command for a Buy Stop with the Limit set 1 tick above the High and the Stop Loss set 1 tick below the Low? I tried the following: res=OrderSend(Symbol(),OP_BUYSTOP,.5,High[1]+MathPow(10,-Digits()),0,Low[1]-MathPow(10,-Digits()),0,"",MAGICMA,0,Blue);...
Guys, I've spent days reading posts about running an expert on an offline chart, fake ticks and all that trying to find out if it is or not possible at this stage to get the start function of an expert on offline chart triggered. I couldn't get a straight answer anywhere. The documentation doesn't...
Hello to all, I have a humble request. Can someone change this indicator to window chart arrows please ? I just want the arrows on the chart (above/below candles). If not, can someone, at least, help and guide me to change it to this way i want ? Thank you very much. Regards.
MetaTrader 4 Client Terminal build 646 has been released. It contains the following changes: Terminal: Completely revised built-in search. The new search is a smart and powerful system. Search results are now conveniently arranged by categories. As you type in your search query, the system...
Hi folks, I've been working on a signals indicator similar to the tutorial available here: https://www.mql5.com/en/articles/1503 I've managed to incorporate my (simple) trend definition of 2 MA's and that is changing the signal to green & red accordingly. For a second signal, I'm attempting to...
Well, thanks to the latest builds (600+) of MT4, we can now easily get this information. Here's the code: void OnStart()  {//---   int HowManySymbols=SymbolsTotal(true);   string ListSymbols=" ";   for(int i=0;i<HowManySymbols;i++)     {      ListSymbols=StringConcatenate(ListSymbols,SymbolName(i...
  Daily Pivot Shift (13   1 2)
I have an EA that can shift the Daily Pivot according to differing times for the close of the candle. Is there a Close Time that the majority of traders around the world use? There are 6 main Options that I have either heard of or could think of. ... 6 Possible Close Times for Daily Pivots: 1)...
I copied roc.mq4 from https://book.mql4.com/samples/iroc exactly the way it is then attached it to a chart and I don't see any lines there at all. Why?
Hi All I have problem to modify Take Profit and I need help; I am openning 2 orders on the same direction, but when I modify them I can modify only one. I open 2 Orders in the same price calculate the stoploss and then calculate take profit, one order TP should 1:1 RR and the second 1:2 RR. I can...
Hi guys, I wrote expert and I want to limit it for 30 days limit and then it will not work. or limit it until specific day. Anyone know how can I do that ? Thanks in advance.  Eyal  
Hello! I need to update my DLL because of changes in build 610. My old DLL and EA compiled before upgrade to 610 works fine in it. But I am not able to run even the simplest new expert + DLL now. I am using Visual Studio 2010 and C#. DLL is compiled as 32bit. Operating system: Windows 7 Prof 64bit...
I would like to find the price difference between the outerlines of a Standard Deviation Channel. The points that are marked A and B. Ican find the price and time of the center line but this doesn't seem to behelpful. I've also explored using iStdDev. Does anybody have an answer how tofind the price...
Please help me calculate rollover, i`m so confused about it. So here is the formula that my broker has on its site Rollover= Swap rate / 10000 * [POSITION SIZE] * [NR OF DAYS] And for Yen Rollover= Swap rate / 100 * [POSITION SIZE] * [NR OF DAYS] I also saw on other sites other formulas like:...
Good morning, I write a simple EA below to run my indicator   if (lastCandle != Time[0])  {   if(iCustom(NULL,0,"MY_INDICATOR",0,1)==2)       {  buy=Close[1];         sl=Close[1]-0.01;         tp2=Close[1]+0.01;         tp1=Close[1]+0.01;      }      else buy=0;  I find that this trading will run...
  I want to deposit funds directly into my MetaTrader acct. Can I do this or do I have to transfer funds from my TradeStation acct.?
Hi I wrote a simple indicator to show an alert when price breaks out of either the high or the low of the previous day's candle or the previous H4 candle.   It seems to compile Ok but the problem is, every time I close and then restart MT4 the indicator disappears. I've shown the code below (I know...
void DrawAllert(string text, color C=LightGray)    {    ObjectCreate ("rect",OBJ_LABEL,0,0,0,0,0);    ObjectSet ("rect",OBJPROP_XDISTANCE,10);    ObjectSet ("rect",OBJPROP_YDISTANCE,20);    ObjectSetText ("rect",text,10,"Times New Roman",C);    }    bool IperComp (double stochastic1now, double...
Hi Everyone, I cannot understand why the following structure doesn't work. When I attach to chart, ONLY buffer buy has value. To my understand, it will run the 2 sequences one by one. So the first FOR() will be fully run first  --> I have buy buffer. Then the second FOR() will be processed. (it is...
Hi, I have to send and will receive ASCII - code from/to the other side of a named pipe. Here https://www.mql5.com/en/docs/constants/io_constants/codepageusage I found lots of encodings - but which one is the old fashioned ASCII ? Thanks in advance, Gooly
Dear Traders , Please help me to call this indicator in to an Other Custom indicator I create, some problems I face now, iCustom(Symbol(),0,"FractalZigZagNoRepaint",ZZDepth,ZZDev,0,i) '0' Buffer For BUYiCustom(Symbol(),0,"FractalZigZagNoRepaint",ZZDepth,ZZDev,1,i) '1' Buffer For SELL I have Added...
1...289290291292293294295296297298299300301302303...1244