I have confirmed the blank default CustomID is the main issue.
The log below (reverse chronological) shows two identical strategy instances being loaded, one with an CustomID set to "ID" and the other the blank default.
The blank default entered into a second position while the one with the ID set did not.
I then started a TEST strategy to log the IDs of all open trades, and it looks like the trades placed by the strategy that had the blank CustomID gets set to FXCM's default of "FXTC" instead of a blank value.
This means that when the strategy checks to see if there are any trades with the blank CustomID, it fails to find them and that is why it issues new trades.
The fix for this is to simply specify a non-blank CustomID value. Additionally, I have updated the code so by default this is non-blank.
- Code: Select all
TEST(USD/JPY[t1], 10, 0) 2014/02/27 16:44:33 Found Trade: 20382885 Amount: 1000 QTXT: FXTC
TEST(USD/JPY[t1], 10, 0) 2014/02/27 16:44:33 Found Trade: 20382874 Amount: 2000 QTXT: ID
TEST(USD/JPY[t1], 10, 0) 2014/02/27 16:44:33 Found Trade: 20382873 Amount: 1000 QTXT: FXTC
TEST(USD/JPY[t1], 10, 0) TEST(USD/JPY[t1], 10, 0) is started.
HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,, ) Market Order (102.351, USD/JPY, Sold 1K, 05276615). Successful.
HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,ID, ) Market Order (102.350, USD/JPY, Sold 2K, 05276615). Successful.
HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,, ) Market Order (102.350, USD/JPY, Sold 1K, 05276615). Successful.
HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,ID, ) HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,ID, ) is started.
HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,, ) HIGHLY ADAPTABLE RSI STRATEGY( USD/JPY,, ) is started.
The previously mentioned holes in the MultipleLimit functionality (Entry Orders, multiple signals in same bar) will not be fixed at this time as there is no standard way to decide which signals is the priority. I don't think this should be a problem for normal use of this strategy.
Cheers,
MooMooFX