it is still the old one:
Code: Select all
variables:
intrabarpersist aBar(0); // intrabarpersist is the key
if aBar <> currentbar then begin
aBar = currentbar;
// all calculation and signals are here
end;
maybe [IntrabarOrderGeneration = False] will do the same, but I'm not sure. coz in my experience, [IntrabaOrderGeneration = False] often fails .... I don't know why... maybe I run two scripts together, one is saying [IntrabaOrderGeneration = False] and another is saying [IntrabaOrderGeneration = True] ......╮(╯3╰)╭
----------------------old msg -------------
Every day when I wake up and logged into my workstation, and found MC lost its connection with FXCM. I thought it was a problem of networking. Now It's more clear that it's not a problem of networking. I turned MC on with out any strategy for the whole night. connect doesn't lost the next day. Once I add some strategy and run it the whole night. the connect lost the next day...
sucks..Then I dig into the log files find out some very interesting things.
Here is some very basic counting of the FXCMTradingSystem_Trace.txt
Firstly I remove lines containning "UpdateAccount: ", "UpdateOrderStatus ". they are useless and takes up almost 80% of the log. sucks idea... @x@.. you should keep logs tight.
Then mark some string patterns to see how many times these patterns repeated. here is the result of the normal part of the log
Code: Select all
Counts String Pattern
19 => fxcm_server::details::CFXCMServerImpl::PlaceOrder
19 NEW ORDER:
19 <= fxcm_server::details::CFXCMServerImpl::PlaceOrder Time
19 CreateFixOrder hr= 0
19 PLACED ORDER:
19 ) Ask=
19 )trades: AccountID=
10 Place entry order : ID -
10 Hedging: Y
18 )closed trades: AccountID=
9 ) Place exit order : ID -
9 )FreeOutdatedOrFilledPosInfoData:
38 )orders: AccountID=
37 OnRowBeforeRemove
38 OnRowAdded:
2 OrdersProcessingBasis: PerTradeBasis
0 condition is false; FILE - .\FXCMServer.cpp, LINE - 76
time of the first row [0x00001584](09.09.2011 - 13:11:15.719)
time of the last row [0x00001584](09.09.2011 - 15:04:54.172)
Code: Select all
Counts String Pattern
542 => fxcm_server::details::CFXCMServerImpl::PlaceOrder
1 NEW ORDER:
542 <= fxcm_server::details::CFXCMServerImpl::PlaceOrder Time
1 CreateFixOrder hr= 0
542 PLACED ORDER:
1 ) Ask=
1 )trades: AccountID=
1 Place entry order : ID -
1 Hedging: Y
0 )closed trades: AccountID=
0 ) Place exit order : ID -
0 )FreeOutdatedOrFilledPosInfoData:
2 )orders: AccountID=
1 OnRowBeforeRemove
2 OnRowAdded:
1 OrdersProcessingBasis: PerTradeBasis
541 condition is false; FILE - .\FXCMServer.cpp, LINE - 76
time of the first row [0x00001584](09.09.2011 - 15:14:55.875)
time of the last row [0x00001584](09.09.2011 - 15:15:10.625)
It's clear MC has some bugs in Exception Handling process. MC is flooding the server!
the log file I already sent to you and your support said it's a problem of broker side... really? I don't think so. I guess, MC flooding broker's server and then the server's firewall cut my connections down. So I have to restart MC to connect to broker's server.