MQL4 and MetaTrader 4 - page 463

To post a new topic, please log in or register
Which is the best way to detect if the price has touched or crossed a trend line
Is there anyway to make text in "Comment()" different font or even color? Or how to make colorful or fontable text in left-up corner of chart? (All I want is to make the text I set easier to see) Thanks so much for your helps and time!!
Hi all, I am a newbie to MQ4. I am trying to create an EA that places the order after a few bars from a Moving Average Crossover. I know how to identify the Moving Average crossover. I know how to count the number of bars. But when I combine these two into a single EA I cannot get the expected...
As a newbie with MQL4 I feel that I am wasting time trying to correct and compile a relatively small and simple custom indicator progam when it should be a quick task for someone with experience in MQL4 programming. I genuinely feel that it will be very useful to run this program so as to get...
  4051 ,1 errors,etc (11   1 2)
int start(){//IF ORDER'S TOTAL NUMBER BELOW TWO OPEN PENDING ORDERS  while(OrdersTotal()<2){   int Emiral=OrderSend(Symbol(),OP_BUYSTOP,0.1,Ask+MarketInfo(Symbol(),MODE_STOPLEVEL)*Point,3,Ask-500*Point,Ask+1000*Point,0);   int Emirsat=OrderSend(Symbol(),OP_SELLSTOP,0.1,Bid-MarketInfo(Symbol()...
//+------------------------------------------------------------------+//|                                     Reverse_Grid_Martingale .mq4 |//|                              Copyright � 2008, Constin           |//|                                             Constin@ForexFactory...
Hi, I want to make a series of indicators that will be presented as a histogram with three buffers (for long, short and range). I started with a simple one but it looks like I stuck. It is a simple MA. If close [i] is less than the value MA [i] then Sell [i] = 1. What is wrong in the code? Thank you...
I am new to MQL4 and I would love to be in contact with someone reasonably close to my home so that we can occasionally get together to help one another about forex trading in general, and especially in using MQL4. One of us may have better knowledge in somethings forex and MQL4 while the other has...
When I try to use some constants I get a "not defined" error I'm talking about the messegebox's constants that start with MB_ and ID and the SendOrder's Constants that start with an OP_ anyone knows how to solve it?
Dear All, Am trying TAB Space but it is not working How to use it in Comment statement or in Objectsettext ? Please help Thanks
Good day, Does anybody know how to color a candle based on certain code criteria. In Tradestation the code I use is: Range > (AvgTrueRange(23) * 1.8) Therefore, what is is doing is, if the range of the current candle is greater than the average true range of the past 23 candles by 1.8 times, make...
Hello, when you make a picture from your chart then you can save this picture with a option to send it online. Is it also possible to make this process automatic in a EA, so that the picture will be save online when my EA open a new trade?
Hi, we all back-tested EAs and got the statistical report. Then some EAs went live. The idea is now to enable an EA to change its own risk-percent (=opening lot size) due to a comparison of the OrderHistory to the statistical results of the back-tests. I have prepared a function to read the...
Hi Forum, This indicator should analyze all currency pairs in all timeframes by searching for a Pinbar. My definition of a Pinbar is this: Long Pinbar = the lower shadow must be at least 75% of the whole candle. Short Pinbar the same with the upper shadow. It is a very simple definition but I put...
Could someone ping me to let me know if MT4 build 509 is working OK or not. I can't seem to get my EA, which I am testing, to work. It seems to freeze, and I get no updates of Alerts and Comments.
for(int otsb=OrdersTotal()-1;otsb>=0;otsb--)              //Check through open orders      {     if(OrderSelect(otsb,SELECT_BY_POS,MODE_TRADES)==true)          {              if(OrderType()==OP_SELL)                                   // if(OrderMagicNumber()==magicnumber)...
Hi, I am writing paper on Resource management systems and I choose to write about Automated currency trading using EA's. But now I discovered that there is no actual schema on internet, that explains how does it actually works, what kind of servers used, how strong security over the network and so...
Hi all, Was trying to get my head around the iMAonArray function. I noticed that if you use a simple array then the iMAonArray function reads from lower to upper bound of the array variable whereas if the array is an indicator buffer array then the iMAOnArray function reads from upper to lower bound...
About below Indicator, I have some questions as below: 1. when "#property indicator_chart_window" is available, we get the result is: when "#property indicator_separate_window" is available, we get the result is: the first picture shows the indicator draw "dot" between x1 and x2 area;...
Hi. I created an pipe communication with my .net app and mt4. When an onder are open, your close price is 0. So I need send exactly this digit to my app, only 0. But mt4 is send 0.00000000 . I create a var called closePrice as double. Need to be double because the close price is a double number...
Dear all, I hope someone of you can help me sending a code that allows me to control how a specific EA trades. What I need to do is to manually drive an expert advisor and make it stop tradding when a specific condition meets. The idea is to manually draw a trend line on MT4, and make the EA stop...
How do I declare an abstract base class in the new beta version of MQL4 or, similarly, in MQL5? The language doesn't seem to permit it, despite being heavily based on C++.
Hello, is here any good code avaible with wich i can read with the MetaTrader a website? For example when i want to read the source code from a website with market news into a expert advisor.
Something weird has happened on my pc... It seems someone has blocked my IP adress from mql5.com I mean it because I can connect from other IP adress... I tried to connect from my office and was able to connect from there. The problem is that my accounts are all from my home IP adress wich was...
Hello Hello Hope that someone here can help me - I need tostart trading and trading fast. I have just ended the forex trading course and am reeeeal excited! I saw the promotion for christmas at traders pulse but am not sure about it - has anyone here traded with them - what do tyou think -...
Good day. My name is Lee and I'm a new trader from the Philippines. I have a classic account but I don't trade live yet because I'm still getting some practice. So what I'm doing now is a demo account that is free. I am certainly learning a lot from this demo account. But surely it would be very...
Hello I've tried using numerous different ea's and it seems like about 75% of them don't work or work randomly. Right now I am messing with a PSAR ea thats suppose to trade on every new dot in the opposite direction and it will not open positions and when it finally does it will not close the...
I've been using a demo account for more than two weeks now. And so far I'm doing good and I'm enjoying it. How long should be a demo account be used? What are the good and bad effects of using a demo account for a longer time? Thanks.
I have created an ea for M10 offline chart there is a condition for order close in ea that if the indicator value crosses the value 30 then close the order.I have also attached the indicator to chart to show the values of indicator on every tick. There are many times indicator value crosses value...
How can i calculate the lot maximum size based on the limits of the free margin?