CCI Strategy

Strategies are published here.

Moderator: admin

CCI Strategy

Postby Apprentice » Fri Sep 17, 2010 4:38 am

CCI Strategy.png


CCI Strategy.lua
(13.35 KiB) Downloaded 1962 times

Buy
Crossover Above Oversold
But only if it has previously reached Oversold Confirmation, Level (150)

Sell
Crossover Below overbought
But only if it has previously reached overbought Confirmation, Level (-150)

The Strategy was revised and updated on December 18, 2018.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 25490
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: CCI Strategy

Postby Nikolay.Gekht » Fri Sep 17, 2010 9:43 am

Please make "CanTrade" parameter "false" by default. Just to protect the users who aren't attentive enough for loosing when the strategy is applied by mistake on a live account.
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: CCI Strategy

Postby spinemaligna » Thu Sep 23, 2010 12:48 am

Many thanks for the prompt action. I am only sorry I couldnt reply earlier but my mobile lifestyle precludes that.
The red warning is well advised but I needed this strategy as a development tool to test trends.
I am using a demo account on DBFX and notice that not all the triggers occur and if they do they are sometimes up to three candles behind. Is this to be expected or could it be down to my current indiferent web connection.

Ross
spinemaligna
 
Posts: 84
Joined: Sun Sep 12, 2010 2:42 am

Re: CCI Strategy

Postby Apprentice » Thu Sep 23, 2010 4:35 am

Thanks for the notice.
There was an error in the algorithm.
The algorithm is also simplified.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 25490
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: CCI Strategy

Postby mmarwaha » Thu Sep 23, 2010 4:58 am

hi,
i was just wondering if this strategy can be set to only take buy or sell signals and is there a way by which it can close a position if there is an opposite signal.
mmarwaha
 
Posts: 2
Joined: Thu Sep 23, 2010 4:51 am

Re: CCI Strategy

Postby spinemaligna » Sat Sep 25, 2010 1:40 am

I am now operating on the FXCM platform to see if there is any difference in performance however they both seem to react the same. There is still a one or two candle lag between CCI crossing the trigger level and a trade being opened.
When I "test strategy" the stops and limits I place seem not to be taken into account on the strategy performance report. Is this to be expected? If so how can I perform a realistic check on how the strategy is operating? Would I have to look at each trigger event manually and note how the trade progressed. Have I missed a control that needs to be switched on.
Is it possible to have the signal trigger a market order instead of an entry order so that the trade can be delayed by a set number of pips to get it going in the correct direction, or would I have to switch "can trade" off and do it manually.
Thanks in anticipation,

Ross
spinemaligna
 
Posts: 84
Joined: Sun Sep 12, 2010 2:42 am

Re: CCI Strategy

Postby Apprentice » Sat Sep 25, 2010 4:15 am

Last Update of this strategy should solve your first problem.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 25490
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: CCI Strategy

Postby spinemaligna » Sun Sep 26, 2010 12:06 am

Yes it does, thanks.
Any thoughts on the rest of my last post as I have started looking at trades following signals manually and it really is taking all night just to look at a weeks worth of data.

Ross
spinemaligna
 
Posts: 84
Joined: Sun Sep 12, 2010 2:42 am

Re: CCI Strategy

Postby Nikolay.Gekht » Sun Sep 26, 2010 6:05 pm

1) To backtest stops and limits you must choose non-FIFO simulation mode (by default, backtester simulates FIFO account where stops and limits does not exist).

2) For more realistic simulation I recommend to use smaller time frame to simulate prices. For example, if you "run" your strategy on 15 minutes timeframe, use 1-minute history to simulate price. In that case you'll have 45 "ticks" per minute instead of 3 "ticks" (high, low, close). This let you to have more "smooth" prices for stops and limits, especially for trailings.

Hm... Isn't "smoother" simulation for bars more convenient? If it is, I can prepare unofficial update with smoother price movement (something like open, (open + high) / 2, high, (high + low) / 2, (close + low) / 2, low) - 6 tick instead of 3 and so on (using 4 as divisor instead 2 we can have 12 ticks per candle).
Nikolay.Gekht
FXCodeBase: Site Admin
 
Posts: 1235
Joined: Wed Dec 16, 2009 6:39 pm
Location: Cary, NC

Re: CCI Strategy

Postby michal33 » Mon Dec 20, 2010 8:05 pm

Hello Nikolay!, privet!
I am just wondering if it is possible to make your strategy to work without closing previous position, which was opened in different direction. Other words, if first opened position was "BUY" and sell order is came to next, so leave BUY position open and open short, instead of closing "BUY".
And other Q for you. Could you please, provide me with the link to simple compiler for lua files--this way I'll be able to make little changes on my own without asking you for that.
Thank you in advance
Misha Levin (from fair lawn,btw)
michal33
 
Posts: 2
Joined: Mon Dec 20, 2010 4:32 pm

Next

Return to Custom Strategies

Who is online

Users browsing this forum: No registered users and 4 guests