Upcoming Empty4 4 and MQL4 Upgrades

Post Reply
AnotherBrian

Upcoming Empty4 4 and MQL4 Upgrades

Post by AnotherBrian »

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
User avatar
mlewis
Trader
Posts: 76
Joined: Wed Mar 21, 2012 1:51 pm
Location: London

Upcoming Empty4 4 and MQL4 Upgrades

Post by mlewis »

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
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Upcoming Empty4 4 and MQL4 Upgrades

Post by SteveHopwood »

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:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
renexxxx
Trader
Posts: 860
Joined: Sat Dec 31, 2011 3:48 am

Upcoming Empty4 4 and MQL4 Upgrades

Post by renexxxx »

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.
User avatar
mlewis
Trader
Posts: 76
Joined: Wed Mar 21, 2012 1:51 pm
Location: London

Upcoming Empty4 4 and MQL4 Upgrades

Post by mlewis »

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
silky
Trader
Posts: 17
Joined: Mon Dec 19, 2011 5:45 am
Location: Sydney, Australia

Upcoming Empty4 4 and MQL4 Upgrades

Post by silky »

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
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

Upcoming Empty4 4 and MQL4 Upgrades

Post by thomasmore »

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)].
You do not have the required permissions to view the files attached to this post.
User avatar
milanese
TechAdmin
Posts: 3293
Joined: Wed Jan 09, 2013 9:02 am
Location: btr rdx, r8 +

Upcoming Empty4 4 and MQL4 Upgrades

Post by milanese »

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:
Global Prime is the official SHF broker :yahoo:
Searching for Servers and Workstations with individual configuration?
Just PM
:smile: Click here to go to the BoardKnowledgeBase
NOTE: Cookies and JavaScript are required for the using the board, with full functionality
User avatar
niepce
Trader
Posts: 152
Joined: Wed Jul 04, 2012 11:00 pm
Location: Grenoble, France

Upcoming Empty4 4 and MQL4 Upgrades

Post by niepce »

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:
thomasmore
Trader
Posts: 275
Joined: Tue Nov 15, 2011 10:35 pm
Location: Knokke, Belgium

Upcoming Empty4 4 and MQL4 Upgrades

Post by thomasmore »

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?
Post Reply

Return to “Know your MT4 platform”