Cevn bounce strategy

If you need an Indicator or Signal developed or translated from other language, please post all Indicator development REQUESTS to this section here.

Moderator: admin

Cevn bounce strategy

Postby Cactus » Mon Mar 28, 2016 12:39 pm

http://cevntuntrading.wix.com/fred-proffitt#!system-settings/zezj1 Can this strategy be written in lua? It is based on CCI peaks forming at 70 levels
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Cevn bounce strategy

Postby Apprentice » Tue Mar 29, 2016 3:03 am

Can you define the entry / exit conditions.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36474
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cevn bounce strategy

Postby Cactus » Sat Aug 27, 2016 12:07 am

Of course. Everything is in this document, please see the attachment. The first component is listed on page 6 and the rest follows. This is a long guide but provides all information with screenshots.

Apparently this is the holy grail. May be a more complex strategy than what's usually posted here, even though it uses 1 indicator?

My attempt at coding this finished with

Code: Select all
    -- update expressions
    if id == id_daily then --Updates handler of 'daily' datasource ('D1'  timeframe)
        --Check that all data of used datasources is available
        if canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1))  and canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1))  and canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 2))  then
            buy_setup = CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] < -70  and  CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1)] < -70  and  CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] > CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1)]  and  CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] < CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 2)];
        end
        --Check that all data of used datasources is available
        if canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1))  and canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1))  and canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 2))  then
            buy_retest = CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] > CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1)]  and  CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] < CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 2)];
        end
        --Check that all data of used datasources is available
        if canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1))  and canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1))  then
            sell_setup = CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1)] > 70  and  CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] > 70  and  CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] < CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1)];
        end
        --Check that all data of used datasources is available
        if canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1))  and canCalculate( CCI.DATA , getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1))  then
            sell_retest = CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1)] < CCI.DATA[getClosedPeriod(CCI.DATA, CCI.DATA:size() - 1 - 1)];
        end
    end

    if id == id_tick then --Updates handler of 'tick' datasource ('t1'  timeframe)
        --Check that all data of used datasources is available
        if canCalculate( tick , getClosedPeriod(tick, tick:size() - 1) )  and canCalculate( daily.open , getClosedPeriod(daily.open, daily.open:size() - 1) )  then
            buy_trigger = tick[getClosedPeriod(tick, tick:size() - 1) ] > daily.open[getClosedPeriod(daily.open, daily.open:size() - 1) ];
        end
        --Check that all data of used datasources is available
        if canCalculate( tick , getClosedPeriod(tick, tick:size() - 1) )  and canCalculate( daily.open , getClosedPeriod(daily.open, daily.open:size() - 1) )  then
            sell_trigger = tick[getClosedPeriod(tick, tick:size() - 1) ] < daily.open[getClosedPeriod(daily.open, daily.open:size() - 1) ];
        end
    end
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Cevn bounce strategy

Postby Cactus » Sat Aug 27, 2016 9:59 am

Just noticed I forgot to include the attachment, so here it is
Attachments
CevnBounceOnlyStrategy.odt
(250.34 KiB) Downloaded 430 times
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere

Re: Cevn bounce strategy

Postby Apprentice » Mon Aug 29, 2016 4:51 am

Your request is added to the development list, Under Id Number 3613
If someone is interested to do this task, please contact me.
User avatar
Apprentice
FXCodeBase: Confirmed User
 
Posts: 36474
Joined: Thu Dec 31, 2009 11:59 am
Location: Zagreb, Croatia

Re: Cevn bounce strategy

Postby Alexander.Gettinger » Fri Mar 15, 2019 7:44 pm

Please try this strategy:
Cevn_Bounce_Strategy.lua
(9.45 KiB) Downloaded 350 times
Alexander.Gettinger
FXCodeBase: Confirmed User
 
Posts: 3785
Joined: Wed Mar 31, 2010 9:40 pm
Location: Russia, Omsk

Re: Cevn bounce strategy

Postby Cactus » Mon Apr 08, 2019 5:09 pm

Thanks I will test it soon
Never chase the money, let the money come to me
User avatar
Cactus
FXCodeBase: Graduate
 
Posts: 242
Joined: Fri Feb 19, 2016 11:46 am
Location: Errywhere


Return to Indicator and Signal Requests

Who is online

Users browsing this forum: No registered users and 20 guests