| New signals service! | |
|
|||||||
| Register in Forex TSD! | |
|
Trading Systems Leaders in this forum (automated trading systems) are winning more than 3000 pips in a month (30000$ investing one lot every time). Click here to register and get more information |
|
![]() |
|
|
LinkBack (1) | Thread Tools | Display Modes |
|
|||
|
Quote:
check ther error channel; Quote:
|
|
|||
|
Quote:
Code:
datetime ExpirationTime = StrToTime(TimeYear(Time[0]) + "." + TimeMonth(Time[0])+ "." + TimeDay(Time[0])+" "+23+":"+55); OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,0,Ask+TakeProfit*Point,"timetest",16384,ExpirationTime,Green); |
|
||||
|
Quote:
Or mabe mines too simple? I dunno Dave |
|
||||
|
Quote:
Code:
int OrderTime;
OrderSend(Symbol(),OP_BUY,LotsOptimized(),Ask,3,Ask+TakeProfit*Point,"timetest",16384,0,Green)
OrderTime=TimeCurrent();
int total = OrdersTotal();
for(int cnt=0;cnt<total;cnt++)
{
OrderSelect(cnt, SELECT_BY_POS, MODE_TRADES);
if((OrderType() <= OP_SELL) && (OrderSymbol() == Symbol()) )
{
if(OrderType()==OP_BUY && TimeCurrent()-OrderTime>(12*60)*60)
{
OrderClose(OrderTicket(),LotsOptimized(),Bid,3,Violet);
}
}
}
Last edited by Wackena; 03-19-2007 at 10:10 AM. |
|
||||
|
code not function right
I used this to email the status of my account every hour to me. however after i compile and loaded it. it sent that email perfectly the next hour at minute# 59 as it's supposed to then it never sent another one again. what i'm i doing wrong? it looks perfect ?
i dont need it at min #59 i just need it every hour!! bool mail; int start() { if (Minute()>=59 && !mail){ SendMail("Account Status", "Account Balance is="+DoubleToStr(AccountBalance(),2)+"_Account Equity is="+DoubleToStr(AccountEquity(),2)+ "_Account Profit is="+DoubleToStr(AccountProfit(),2)+"_Account Margin is="+DoubleToStr(AccountMargin(),2)+ "_Account Free Margin is="+DoubleToStr(AccountFreeMargin(),2)); mail=true; } |
![]() |
| Bookmarks |
| Tags |
| CHinGsMAroonCLK, I_XO_A_H |
| Thread Tools | |
| Display Modes | |
|
|
LinkBacks (?)
LinkBack to this Thread: http://www.forex-tsd.com/metatrader-programming/554-how-code.html
|
||||
| Posted By | For | Type | Date | |
| Need an experienced programmer? - Page 2 | Post #0 | Refback | 09-24-2008 06:24 AM | |
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| How to code this? | iscuba11 | Metatrader 4 mql 4 - Development course | 1 | 08-03-2007 04:22 PM |