| 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:
void Print( ...) Prints a message to the experts log.
__________________
|
|
||||
|
Hi guys I need a bool function that returns true if 5 mins has passed, or 10 mins or whatever. I know how to check for a new bar already but its not often enough.
__________________
You can find me on irc.ircforex.com most of the time... on #forex Myspace Facebook My Indicators: Trade Assistant Trend Friend ToR CCI Helper Holder of US Patent 6,774,788 |
|
||||
|
Quote:
Code:
double LastRedraw = 0;
if(TimeLocal() - LastRedraw > 300)
{
Print();
ObjectsRedraw();
Print("ObjectsRedraw Done");
LastRedraw = TimeLocal();
}
__________________
|
|
|||
|
Quote:
Code:
bool ElapsedTimeCheck(int MyMinutes)
{
static datetime OldTime;
if (OldTime == 0)
OldTime = TimeCurrent() + MyMinutes * 60; // initialised once...
if (TimeCurrent() >= OldTime)
{
OldTime = TimeCurrent() + MyMinutes * 60;
bool cond = true;
}
else cond = false;
return(cond);
}
|
|
||||
|
Cool thanks guys, both of the suggestions are probably better than what I was working on.
__________________
You can find me on irc.ircforex.com most of the time... on #forex Myspace Facebook My Indicators: Trade Assistant Trend Friend ToR CCI Helper Holder of US Patent 6,774,788 |
|
|||
|
Somebody please help me....
Hi...
I hope somebody here can help me how to code this.This is martiangle EA and what i want to do is: 1 . When 2nd layer post open,i want target point at 1st layer move to target point 2nd layer.So when target point hit at 2nd layer ,that 2 post can close at same time.If 3rd layer is open,that 1st and 2nd layer target point can move to 3rd target point price.So we can close at same time.Same happend if 4th layer,5th layer and other layer open.Just need move all Target Point to current layer Target Point or post. 2.Need pips lock.When 1st layer open,and got profit example 15 pip (TP 32),the ea make locking at sl price(example 5 pip)So when price reversel 10 pip that post can close automatically with profit 5 pips.Just for 1st layer post only.2nd layer do not need activated because this martiangle EA. I m very sorry for my bad english.Hope someone can help me with put a code at this EA. Thank You Martiangle RSI .mq4 Regards Really Need Help Person |
|
||||
|
Comment help please
I am trying to set up a comment to show on screen but not having much luck
I have managed to get the pip count for a single pair but I can't seem to show the collated total for multiple pairs Any help would be great this is an example of that code //========== FUNCTION getPipValue double getPipValue(double ord,int dir) { double val; RefreshRates(); if(dir == 1) val=(NormalizeDouble(ord,Digits) - NormalizeDouble(Ask,Digits)); else val=(NormalizeDouble(Bid,Digits) - NormalizeDouble(ord,Digits)); val = val/Point*co; return(val); } //== end function int getSpread() { int spread=MarketInfo(Symbol(),MODE_SPREAD); return(spread); } //========== FUNCTION getOpenOrders void getOpenOrders() { int nsl, nsd; string mngMagic, trailon; int totalorders = OrdersTotal(); for(int j=0; j<totalorders;j++) { OrderSelect(j, SELECT_BY_POS, MODE_TRADES); if((OrderType() == OP_BUY || OrderType() == OP_SELL) && OrderSymbol() == Symbol()&&(MagicNumber==0 || MagicNumber == OrderMagicNumber())) { double val=getPipValue(OrderOpenPrice(),OrderType()); //int val = OrderProfit()/(OrderLots()*10); } if(MagicNumber == 0) mngMagic = "All "+Symbol()+" trades."; else mngMagic = "Trades with magic number = "+MagicNumber; //RefreshRates(); Comment("Balance: ",AccountBalance(),", Account Equity: ",AccountEquity(),", Account Profit: ",AccountProfit(),"Order Open: ",OrderOpenPrice(), "\nPip Count: ", val, "\nMy Account Cutoff Limit: ",Open_Loss_To_CloseTrades, "\nManaging: ", mngMagic); Cheers |
|
||||
|
The pips value of a current order may be obtained by the following:
PHP Code:
|
![]() |
| 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 |