You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
> 10 experts ask "is trade allowed?", 10 experts receive answer "yes of course", 10 experts send order but first
> expert only trade successfully. other 9 experts are losers and outsiders
hehehe... yep. : )
Now you see why some people run into problems. We take the program and use it to it's fullest capabilities.
You guys have been doing a good job with the improvements.
- Vooch
string SemaphoreName="TradeSemaphore"; ////////////////// int init () { if(!GlobalVariableCheck(SemaphoreName)) GlobalVariableSet(SemaphoreName,0.0); bla-bla-blabool bSemaphored=false; while(!IsStopped()) { if(GlobalVariableGet(SemaphoreName)==0.0) { GlobalVariableSet(SemaphoreName,1.0); bSemaphored=true; break; } Sleep(1000); } if(nSignal == OP_BUY) Buy(); else if(nSignal == OP_SELL) Sell(); for(int nCnt = OrdersTotal() - 1; nCnt >= 0; nCnt--) { OrderSelect(nCnt, SELECT_BY_POS, MODE_TRADES); if(OrderMagicNumber() == nMagic) { if(CurTime() - OrderOpenTime() > (nHoursToHold - 1) * 60 * 60) { if(OrderType() == OP_BUY) OrderClose(OrderTicket(), OrderLots(), Bid, nSlip, Aqua); else if(OrderType() == OP_SELL) OrderClose(OrderTicket(), OrderLots(), Ask, nSlip, OrangeRed); } } } if(bSemaphored) GlobalVariableSet(SemaphoreName,0.0);