stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

Upcoming Empty4 4 and MQL4 Upgrades
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3016
Page 15 of 19
Author:  AnotherBrian [ Wed May 27, 2015 2:20 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

When one of my live platforms auto updated the password was gone... the one I had recorded was not correct of course.... back up and running now, inconvenience
Author:  mlewis [ Mon Jun 01, 2015 5:45 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

ughhh... is anybody else having issues with the new build 830? was forced to update after I got the dreaded 'old version' message and now EA's acting all funny, not closing trades etc. even though the compiler says everything is fine with the code.

Code: Select all

//+------------------------------------------------------------------+
void Long () { 
//+------------------------------------------------------------------+  
{   
            if ((tradesize) > 0)
            {       //check that the spread is within limit - if not = no trade
               PlaySound("tick.wav");          //let the user know that the script is running 
               bidfill = iClose(Pair,0,0);                  //record the price for the csv file
               int ticketlong = OrderSend(Pair,OP_BUY,tradesize,iClose(Pair,0,0),3,0,0,"CSS",MagicNumber,0,White);    //make the oredr with no stop for ECN
               if (screenshot)  { WindowScreenShot(Pair+" Last Trade.gif", 960, 640);}
               if(ticketlong<0){
               string Error_Text = ErrorDescription(GetLastError());
               Alert("OrderSend failed with error "+Error_Text);
               Print("OrderSend failed with error "+Error_Text);
               }
            }
            tradesize = 0;
}
return; 
}


is the entry code I use and...

Code: Select all

//+------------------------------------------------------------------+
void CloseLong () { 
//+------------------------------------------------------------------+   
   int total=OrdersTotal()-1;
   for(int cnt=total;cnt>=0;cnt--)
     {
      if (OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)==true){
         if(OrderSymbol()==Pair &&
            (OrderType() == OP_BUY)&&
             (OrderMagicNumber()==MagicNumber))  // check for symbol
               {  
                    bool closetradeLONG = OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close position
                    return; // exit
               }
         }            
   }
}

is the closure code I use just for reference.

Mark
Author:  SteveHopwood [ Mon Jun 01, 2015 6:07 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

Bloody hell. Build 830?

My PPoS demo is still 670 and my live trading account (both GP) is only 765 - and I only allowed that update because The Cretins at CrapperQuotes announced that they were turning off the older builds. Look like they lied.

Or GP has something the Cretins do not know about.

Good luck sorting this one out. I will need to be dragged kicking and screaming from my current versions and so cannot help.

:xm:
Author:  renexxxx [ Mon Jun 01, 2015 7:51 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

mlewis » Tue Jun 02, 2015 3:45 am wrote:ughhh... is anybody else having issues with the new build 830? was forced to update after I got the dreaded 'old version' message and now EA's acting all funny, not closing trades etc. even though the compiler says everything is fine with the code.

Code: Select all

//+------------------------------------------------------------------+
void Long () { 
//+------------------------------------------------------------------+  
{   
            if ((tradesize) > 0)
            {       //check that the spread is within limit - if not = no trade
               PlaySound("tick.wav");          //let the user know that the script is running 
               bidfill = iClose(Pair,0,0);                  //record the price for the csv file
               int ticketlong = OrderSend(Pair,OP_BUY,tradesize,iClose(Pair,0,0),3,0,0,"CSS",MagicNumber,0,White);    //make the oredr with no stop for ECN
               if (screenshot)  { WindowScreenShot(Pair+" Last Trade.gif", 960, 640);}
               if(ticketlong<0){
               string Error_Text = ErrorDescription(GetLastError());
               Alert("OrderSend failed with error "+Error_Text);
               Print("OrderSend failed with error "+Error_Text);
               }
            }
            tradesize = 0;
}
return; 
}


is the entry code I use and...

Code: Select all

//+------------------------------------------------------------------+
void CloseLong () { 
//+------------------------------------------------------------------+   
   int total=OrdersTotal()-1;
   for(int cnt=total;cnt>=0;cnt--)
     {
      if (OrderSelect(cnt,SELECT_BY_POS,MODE_TRADES)==true){
         if(OrderSymbol()==Pair &&
            (OrderType() == OP_BUY)&&
             (OrderMagicNumber()==MagicNumber))  // check for symbol
               {  
                    bool closetradeLONG = OrderClose(OrderTicket(),OrderLots(),Bid,3,Violet); // close position
                    return; // exit
               }
         }            
   }
}

is the closure code I use just for reference.

Mark
Hi Mark,

By the look of your code, this is a multipair EA and you have set the global variable 'Pair' to a certain symbol (outside of the given code-snippets). That is fine, but then you can not refer to the Bid variable (in line 12 of the second code-snippet), as Bid refers to the bid of the current symbol (Symbol()). You must replace Bid with MarketInfo( Pair, MODE_BID );
May be this is the reason why your trade is not closed -- the given price is too far away from the market price.

Cheers ... Rene.
Author:  mlewis [ Mon Jun 01, 2015 9:46 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

ahhhh Rene i love you! (and yeah... sloppy coding!)
I didn't try this yet but sounds like very helfpul advice. I've also coded it so that it wont place a new trade until the original trade is closed so suspected the orderclose void was the issue. I rememberer bodging from single pair to basket quite quickly and thinking " ahhh... screw it, it works". But after the update it doesn't.
M
Author:  silky [ Fri Jun 12, 2015 12:06 am ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

Here we go again with next pain in the **se, MetaCrap Update , courtesy of Ivan and Co Horts.
New Empty4 4 Build 840: Improvements and Fixes
Empty4 4 platform update is to be released on Friday, June 12, 2015.
http://forum.mql4.com/67997
Author:  thomasmore [ Sat Jun 13, 2015 11:47 am ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

Metaquotes Headquarters building bears a new sign over the main entrance to the developers division: "Lasciate ogni speranza, voi ch'entrate." [Abandon all hope, you who enter here(From Dante's La Divina Commedia)].
Author:  milanese [ Sat Jun 13, 2015 12:08 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

ludowillems » Sat Jun 13, 2015 11:47 am wrote:Metaquotes Headquarters building bears a new sign over the main entrance to the developers division: "Lasciate ogni speranza, voi ch'entrate." [Abandon all hope, you who enter here(From Dante's La Divina Commedia)].
:clap: :clap:
Author:  niepce [ Sat Jul 04, 2015 4:10 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

After upgrading one of my terminals from B765 straight to b840, I noticed RAM increase for terminal.exe, from 50MB to 200MB :youknow:

Anyone got the same ??? :geek:
Author:  thomasmore [ Sat Jul 04, 2015 4:28 pm ]
Post subject:  Upcoming Empty4 4 and MQL4 Upgrades

niepce » 04 Jul 2015, 18:10 wrote:After upgrading one of my terminals from B765 straight to b840, I noticed RAM increase for terminal.exe, from 50MB to 200MB :youknow:

Anyone got the same ??? :geek:
Mine eats about 125 Mb. Depends on the number of charts open?
All times are UTC Page 15 of 19