MQL4 and MetaTrader 4 - page 730

if shutdown the computer and when i open it ea again sending order . how can i stop it forex
Dear Guys How can i write code to add button like that.  
I was studying Average True Range indicator that I realized the calculation used in standard MT4 indicator is different than original formula. The calculation of ATR in MT4 is based on following formula: ATR[i] = ATR[i-1] + ( TR[i] - TR[i-n] ) / n; // n is the ATR period But the original formula as
[Deleted]
Hi, I'm coding an EA that opens Buy a Sell trades when the Price breaks the Trendline. To do so, I'm comparing price values to trend line values. But I don't understand why it's not working. Basically the conditions are  --> Buy if(Close[1] < NormalizeDouble(ObjectGetValueByShift(trendlineName,1)...
Dear Guys, How i create a property with custom multiple option. example My EA will two type of order 1. Stop order 2. Limit Order. So i created a property  int Type  = 0    (0-mean Stop, 1-mean Limit order). But now i want to text into multiple choose . like:     How can i write code like that. 
Just want to draw a line....one horizontal line (will add more after this one works). I drag the indicator (*.mq4) on top of my chart and nothing happens. Why isn't it drawing a horizontal line? What it should be doing is taking the price level "1.68744" and adding variable "hirange" and drawing the...
I'm trying to find a broker like IBFX -AU with the following features: Mini account with 1:100 leverage: In MT4 when i open a trade on EURUSD with 0.01 lot , the margin will be 1.3 not 13 like other brokers i test many brokers but they offer one account ( 1 lot standard , 0.1 mini and 0.01 micro )...
I am not able to get Meta4 to install. Have placed 2 prior subjects with no answers. Can someone please help? Downloads fine. Get proxy server pop up at location step. Have disabled anti-virus. Made Explorer default browser. Tried clicking cancel and placing Server sent by login info. Using Win7....
Hi, I have a problem....i cant' install Mt4 on my pc desktop. I tried also with s.o win xp and win 7 but the problem is the same. When i launch the executable file of mt4 from the site ( i tried also placing the executable on an USB pendrive) to install the program on my pc after 2 sec the following...
[Deleted]
Hi, is it possible to sort an array of structs ? Say: struct profit_targets {    string   target_type;   //name of target, "Target 1", "Target 2"     double   target_price;  //price of the target };  profit_targets   all_TP[2]; all_TP[0].target_type = "Target 1"; all_TP[0].target_price= 1.35666;...
Hi.is there way i could trade different accounts with different server locations on the same meta trader multi-terminal software from the same forex broker.For instance i have from one broker the following accounts Account 1.:  789456   server 78.78.78.79 Account 2 :  321654   server 32.32.32.31...
i'm using build 670.  Say I have 5 separate tickets of eurusd filled.  Can I initiate a 'closeAll' where I send 5 requests to close the orders such that I can send one request without having to wait for the previous request to report back?  In looking at the journal, it looks like I must wait until...
Hi, I have opened chart and under the bars there is RSI indicator and Moving Average indicator on RSI (not on the bars) as first or previous indicator data. Question: Can I code the moment when the line of Moving Average cut RSI line or vice versa? Rgds,
I noticed with the new strategy tester b670 the EA properties input list of parameters is now missing.  Look at the screenshot from b646: And now b670. Is this a bug or is it intentionally removed?  If intentional, can an option be put in to optionally include the inputs in the report?  I have lots...
[Deleted]
Hello, I didnt trade about 1 year and now my old EA doesnt work beucase warning "order select should be checked " It's on the line with orderselect. How can I repair it? Any good ideas for "warnings with checking"? thank you :)) bool IsTrade = False; for (int i = 0; i < Total; i ++) {
Is it possible in MT4 to close a portion of an order?  For example, for an order that has 10 Lots, is it possible to close 8 Lots and leave the remaining 2 Lots?
Please help me with the code for my EA to make one trade per indicator cross signal and wait for another cross again to make another trade decision. Thanks.
[Deleted]
Hi there The candle sticks have been appearing very strange on my MT4.  
  Order History  (3)
I need to find out whether the last closed order was a short or long position for a specific symbol, is this possible?  If so please could you point me in the right direction with some of the functions I will need Thanks.
Hi, I would like to know if there is any way to make the trading disable trough the expert advisor?\  What I mean is that I have couple of experts that working in charts, and I want to build another expert advisor that if the account balance/equity is under x value than disable the trading of any...
  Question EA  (3)
Hallo, Im trying to write an EA based on PSAR and MACD. if the PSAR gives a Sell Signal and the MACD is less than its signal line i want to place a Sell order. When backtesting the EA doesnt open a Sell if the trade logic includes: if(openorders==true)if(PSAR_BAR1 < CLOSE_BAR1 && PSAR_BAR0 >...
New article Do Traders Need Services from Developers? has been published: Algorithmic trading becomes more popular and needed, which naturally led to a demand for exotic algorithms and unusual tasks. To some extent, such complex applications are available in the Code Base or in the Market. Although...
[Deleted]
I have this, with help from FXEZ, but it loops throug all orders, and I only want to through the last 2 orders. bool TradePriceAllowed() {   for(int k=OrdersTotal()-1;k>=0;k--) {      if((OrderSelect(k,SELECT_BY_POS,MODE_TRADES)) &&        (OrderSymbol()==Symbol())&&(OrderMagicNumber()==Magic))...
[Deleted]
Hi,   I am absolutly new to MQL4 coding. I want to make it happen that it changes the comment of an order. And I want that it checks the order comment in an if-sentence after that.    How to code that?   Thanks! :) 
Hi, Is this possible to open trade on exact seconds? eg: @10(HH):15(MM):01(SS) i want open buystop/sellstop at 10:15:01 is this possible to code to filter seconds?
I cannot uninstall mt4 on my computer. Even when I attempt uninstall using the "run as administrator" option, I get this message: C:\Program Files(x86)\IBFX MT4\Uninstall.exe A referral was returned from the server. My broker is IBFX.
[Deleted]
  Meta Trader 4 Tester Bugs  (19   1 2)
I found some strange behaviour on MT4 when you are testing an EA or Indicator that calls another indicator that has higher time frame than your tester time frame. It worked well on trading environment, but doesn't works on tester environment. Given example you are testing the indicator using M1...
  Gap or no gap on AUD/NZD?  (13   1 2)
Last Thursday there was a news in New Zealand and that prompted the Kiwi to fall sharply against the Aussie.   According to my MT4 , there was a huge gap at 7 AM, EST Australia time or 00.00 MT4/ broker time.   See images:               But...on the ProRealTime chart, there was no gap...so I wonder...
[Deleted]
Is there a way to add the new close, of a period, to the sum of previous period(s) closes?  So that I can divide by the number of periods, to find the average close value? Thanks!
  Question for IF  (5)
Dear friends ,   i have a question for "if" and it would be great if you help me   is it correct to write something like this?   if((A1>100 && A2<100) || (B1>100 && B2<100));