Error number 6 - page 15

 
Hmm.... It turns out that my EA did not check for tradeability
  if (!IsTradeAllowed()) {Print(TimeToStr(CurTime())," no trade available");return;}


Apparently I wanted to, but forgot to put it in.
Only had one, so have to re-check everything.

 
Experts are unable to trade, but manually everything is OK? <br / translate="no"> we have several terminals running at the moment. 50 million accounts each. the scripts are trading non-stop. no problems. and our home server is on another continent, not in the next room.

Yeah, that's right.
I've got a $1 million account, 8 experts.
For yesterday - 78 attempts, 73 of them errors (2 #4108, 1 #128, the rest #6).
For today - 112 attempts, including 100 errors, all №6.

I can send you Trade_log if you need it...
 
We have several terminals running at the moment. 50 million accounts opened. скрипты торгуют в режиме нон-стоп. no problems. and our home server is on another continent, not in the next room.

Try to make trades with long interruptions (once an hour or longer) and the rest of the time the EA should not do anything.
 
what is remarkable is that the connection is indeed there:
+--------------------Expert-Information----------------------------+<br / translate="no"> + ExpertName = *****
+ ChartSymbol = USDCHF
+ ChartPeriod = M15
+------------------------------------------------------------------+

+--------------------Error-Information-----------------------------+
+ LocalTime = 2005.09.23 11:58:40
+ Function = TrailingStop
+ GetLastError = 6
+ ErrorDescription = no connection with trade server
+ Action = No trade for 5 min...
+------------------------------------------------------------------+

+--------------------Market-Information----------------------------+
+ Bid = 1.2828
+ Ask = 1.2833
+ Spread = 0.0005
+ StopLevel = 0.0006
+------------------------------------------------------------------+

+-------------------LastBar-Information----------------------------+
+ Time [0] = 2005.09.23 10:45
+ Open [0] = 1.2815
+ High [0] = 1.2828
+ Low [0] = 1.2815
+ Close [0] = 1.2828
+------------------------------------------------------------------+

+--------------------Server-Information----------------------------+
+ ServerAddress = Alpari-Demo
+ ServerTime = 2005.09.23 10:58:44
+------------------------------------------------------------------+

+--------------------Account-Information---------------------------+
+ AccountNumber = 63310
+ AccountName = komposter
+ AccountEquity = 976116.89
+ AccountFreeMargin = 974215.13
+ AccountMargin = 1901.76
+
+ AccountBalance = 974896.11
+ AccountProfit = 1220.78
+ AccountCredit = 0.00
+ AccountCurrency = USD
+ AccountLeverage = 100
+------------------------------------------------------------------+
 
Hmmm.... Turns out my tips didn't check for tradeability<br / translate="no">
 if (!IsTradeAllowed()) {Print(TimeToStr(CurTime())," no trade is available");return;}


Apparently I wanted to, but forgot to put it in.
There was only one, so you have to re-check everything.



By the way, I don't have such a feature either. Maybe this is the mystery?
 
Ah, phew... it's just checking the 'allow to trade' box !!!! :)))))))))
 
By the way, I don't have this feature either. Maybe that's the mystery.

No, that's definitely not the secret =)

I have it before every operation:
- check IsConnected
- check IsTradeAllowed
- if another Expert Advisor trades, wait (semaphore)
- obligatory pause for 60 sec (if necessary, i.e. if no one has traded for a long time, there is no pause)
- Update all prices (might have changed during the pause)
- and only then try to trade.

If error #6 occurs, the next pause is 300 seconds, i.e. 5 minutes.


NOTHING HELPS.
 
Ah, phew... it's just checking the "allow to trade" box !!!! :)))))))))

no, not only - it is also a check to see if another expert is trading ;)
 
А кстати, у меня такой фичи тоже нету. Может в этом и кроется тайна?

no, that's definitely not the mystery =)

I have before every operation:
- IsConnected check
- check IsTradeAllowed
- if another Expert Advisor trades, wait (semaphore)
- obligatory pause for 60 sec (if necessary, i.e. if no one has traded for a long time, there is no pause)
- Update all prices (might have changed during the pause)
- and only then try to trade.

If error #6 occurs, the next pause is 300 seconds, i.e. 5 minutes.

I see... :( It's a pity, the work is so slow because of this...


NOTHING HELPS.
 
It is very likely that some PROCESS is falling asleep or that a brief loss of communication will set a flag and not be cleared again, as no more orders are placed after the error has occurred. Only restarting the terminal helps.