Highly adaptable RSI Strategy

Strategies are published here.

Moderator: admin

Re: Highly adaptable RSI Strategy

Postby amazon1a » Thu Feb 20, 2014 10:05 pm

Hi MooMoo,

I have the same problem - too many trades. I set the limit to 2 but had up to 9 trades on one pair and many more than 2 on several other pairs in each direction. Practice trading on 15 minute TF.

Thanks, AG
User avatar
amazon1a
 
Posts: 73
Joined: Wed Oct 05, 2011 10:47 am

Re: Highly adaptable RSI Strategy

Postby moomoofx » Fri Feb 21, 2014 1:39 am

Ok thanks everyone for raising the issue. I'll do some testing on a demo account and try to reproduce. If someone could send me a screenshot of their strategy parameters that would be great.
User avatar
moomoofx
FXCodeBase: Confirmed User
 
Posts: 193
Joined: Wed Oct 23, 2013 10:26 pm
Location: Okinawa, Japan. http://moomooforex.com

Re: Highly adaptable RSI Strategy

Postby sqrrl99 » Mon Feb 24, 2014 12:09 pm

I have tried to take a snapshot, but that does not want to work for me. I am working on a 5 minute timeframe with buys only. I buy when rsi crosses over the 70 line. I am setup with multiple positions allowed, but open position limit is set at 3. I use a trailing stop and no moving average filter.

I hope this helps you find the problem.

Thanks,

Jason
sqrrl99
 
Posts: 23
Joined: Thu Feb 13, 2014 1:58 pm

Re: Highly adaptable RSI Strategy

Postby moomoofx » Tue Feb 25, 2014 3:01 am

Thanks for the information.

I managed to put the strategy in a situation where it exceeds the position limit if there are multiple trade signals generated in the same bar.

For example: If your actions are buy at 30, buy at 50, and buy at 70 .... and the RSI moves from 20 to 80 in one bar, you'll find it will trigger all three actions at once ending up with 3 positions.

I was going to fix this by only allowing a single action of each type per bar. This does not sound like your problem however.

The only other things I can think of that might create the problem would be
- Entry orders are not included in the counts. So it is possible to create more entry orders than the configured max number of positions. I'm still debating whether to fix this or not.
- CustomID when blank (default is blank) may not work on some accounts. CustomID is the magic number used to link trades to the strategy. This prevents multiple instances of the strategy on the same instrument conflicting with each other. I need to test this.

So, therefore can I ask you
- Do you use Entry orders or Market Orders?
- If you enter a value into the CustomID parameter, does it fix the problem?

Cheers,
MooMooFX
User avatar
moomoofx
FXCodeBase: Confirmed User
 
Posts: 193
Joined: Wed Oct 23, 2013 10:26 pm
Location: Okinawa, Japan. http://moomooforex.com

Re: Highly adaptable RSI Strategy

Postby sqrrl99 » Tue Feb 25, 2014 12:05 pm

I am using market orders, not entry orders
sqrrl99
 
Posts: 23
Joined: Thu Feb 13, 2014 1:58 pm

Re: Highly adaptable RSI Strategy

Postby sqrrl99 » Wed Feb 26, 2014 2:22 am

I am gonna test the customerid parameter to see if that works...will let you know tomorrow
sqrrl99
 
Posts: 23
Joined: Thu Feb 13, 2014 1:58 pm

Re: Highly adaptable RSI Strategy

Postby moomoofx » Thu Feb 27, 2014 12:51 am

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
User avatar
moomoofx
FXCodeBase: Confirmed User
 
Posts: 193
Joined: Wed Oct 23, 2013 10:26 pm
Location: Okinawa, Japan. http://moomooforex.com

Re: Highly adaptable RSI Strategy

Postby sqrrl99 » Thu Feb 27, 2014 1:55 pm

I was just getting on to let you know that the problem was fixed by filling in the customer id number. Thanks for all your help MooMoo!

Jason
sqrrl99
 
Posts: 23
Joined: Thu Feb 13, 2014 1:58 pm

Re: Highly adaptable RSI Strategy

Postby yeders » Fri Feb 28, 2014 6:37 pm

Hi there,

Just trying to configure this strategy.
In the calculation section of the parameters, with the level 1 line cross over etc, what should they be set to? Cross over is sell and cross under is buy, for all 7 levels?

Thanks
yeders
 
Posts: 6
Joined: Fri Feb 21, 2014 12:34 am

Re: Highly adaptable RSI Strategy

Postby moomoofx » Sat Mar 01, 2014 3:27 am

Hi Yeders,

This strategy gives you the power to configure it however you like. This is an RSI strategy, the levels equate to values of the RSI indicator.

The question is, what do YOU want it to do?

For example, if YOU want a strategy to sell when the RSI value crosses OVER 70, you would want to make sure that you have one level set to 70 and then the corresponding Level X Line Cross Over action set to Sell.

And so on.

Cheers,
MooMooFX
User avatar
moomoofx
FXCodeBase: Confirmed User
 
Posts: 193
Joined: Wed Oct 23, 2013 10:26 pm
Location: Okinawa, Japan. http://moomooforex.com

PreviousNext

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 8 guests