Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools

Metatrader Forum | Forex Expert-Advisor | Broker & Forex Tools (http://www.expert-advisor.com/forum/index.php)
-   Skripte (http://www.expert-advisor.com/forum/forumdisplay.php?f=26)
-   -   Reissleine für Offene- und Order-Trades (http://www.expert-advisor.com/forum/showthread.php?t=2972)

Crashbulle 31.05.13 10:20

Reissleine für Offene- und Order-Trades
 
Ich suche ein Tool, Indikator, Skript, welches über ein Dauerbutton/Panikbutton im Cartfenster beim Betätigen sofort alle Laufenden- und Standbuy-Trades schließt.
Ich hatte früher mal eines je für Sell- und Buy-Trades, kann es aber nicht mehr finden.

Hoschie 31.05.13 10:39

Zitat:

Zitat von Crashbulle (Beitrag 21406)
Ich suche ein Tool, Indikator, Skript, welches über ein Dauerbutton/Panikbutton im Cartfenster beim Betätigen sofort alle Laufenden- und Standbuy-Trades schließt.
Ich hatte früher mal eines je für Sell- und Buy-Trades, kann es aber nicht mehr finden.

Hoi,

versuch das hier mal:
MT4GUI


Hier ein kleines Code-Beispiel, aber ich habe das noch nicht getestet.
http://forum.mql4.com/54924
PHP-Code:

#import "mt4gui.dll"   
   
int tbPutButton(int,int,int,int,int,string);   
   
bool tbIsClicked( int );
#import
int btn1 0;
int closebtn;

int init()
  {
 
closebtn tbPutButton(WindowHandle(Symbol(),Period()),210,145,100,35,"Close All");      
   
pFontSize(14);
   return(
0);
  }
if (
tbIsClicked(closebtn))
      {
      
PlaySound("ok.wav");
      
closeTrades(); // Deine Methode
      
}

Print(
tbIsClicked(closebtn));
  return(
0);
  }
 
      
void closeTrades()
      {      
         for (
int cnt OrdersTotal(); cnt >= cnt--)
         {
            if (
OrderSelect(cntSELECT_BY_POSMODE_TRADES) == TRUE)
             {     
                 if(
OrderMagicNumber()==0)
                {
                    if(
OrderType()==OP_BUY)
                    {
                      
OrderClose(OrderTicket(),OrderLots(),Bid,5,White);
                    } 
                    if(
OrderType()==OP_SELL)
                    {
                      
OrderClose(OrderTicket(),OrderLots(),Ask,5,Blue);
                    } 
                }       
            }
         } 
      } 

Carpe Diem,
Hoschie


Alle Zeitangaben in WEZ +2. Es ist jetzt 06:19 Uhr.

Powered by vBulletin® Version 3.8.5 (Deutsch)
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.6.1
Powered by vBCMS® 2.7.0 ©2002 - 2024 vbdesigns.de
Copyright ©2009 - 2023 by Expert-Advisor.com - Das Metatrader Forum