Results 1 to 6 of 6
 0 Attachment(s)    

Thread: [HELP] TCCI INDICATOR

  1. #1

    Default [HELP] TCCI INDICATOR

    Dear all coder.

    can you teach me how to calling TCCI custom indicator,
    buy when Candlestick cross TCCI Up line
    sell when Candlestick Cross TCCI Dwon line


    i tried with funyoo code,
    if(tccifilter){
    double ma_cur=iCustom(NULL,0,"TCCI",Price,Length,Displace ,Filter,Color,ColorBarBack,Deviation,0,shift);
    double ma_prev=iCustom(NULL,0,"TCCI",Price,Length,Displac e,Filter,Color,ColorBarBack,Deviation,0,shift+1);
    double ma_preva=iCustom(NULL,0,"TCCI",Price,Length,Displa ce,Filter,Color,ColorBarBack,Deviation,0,shift+2);

    double buy_ma_cur=iCustom(NULL,0,"TCCI",Price,Length,Disp lace,Filter,Color,ColorBarBack,Deviation,1,shift);
    double buy_ma_prev=iCustom(NULL,0,"TCCI",Price,Length,Dis place,Filter,Color,ColorBarBack,Deviation,1,shift+ 1);

    double sell_ma_cur=iCustom(NULL,0,"TCCI",Price,Length,Dis place,Filter,Color,ColorBarBack,Deviation,2,shift) ;
    double sell_ma_prev=iCustom(NULL,0,"TCCI",Price,Length,Di splace,Filter,Color,ColorBarBack,Deviation,2,shift +1);
    }
    int signal=0;
    if((channelsignal==false || (channelsignal && Open[shift]<ObjectGetValueByShift("HH",shift) && Close[shift]>ObjectGetValueByShift("HH",shift)))
    && (onetradeperday==false || (onetradeperday && timey!=iTime(NULL,1440,0)))
    && (tccifilter==false || (tccifilter && sell_ma_cur==EMPTY_VALUE && buy_ma_cur!=EMPTY_VALUE))
    && IsTradeContextBusy()==false)signal=1;

    if((channelsignal==false || (channelsignal && Open[shift]>ObjectGetValueByShift("LL",shift) && Close[shift]<ObjectGetValueByShift("LL",shift)))
    && (onetradeperday==false || (onetradeperday && timey!=iTime(NULL,1440,0)))
    && (tccifilter==false || (tccifilter && buy_ma_cur==EMPTY_VALUE && sell_ma_cur!=EMPTY_VALUE))
    && IsTradeContextBusy()==false)signal=2;

    but it's not working, because all line always had value (buy_ma_cur and sell_ma_cur)


    please help me
    thanks
    Last edited by Trint; 11-15-2010 at 00:11.

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Trint View Post
    Dear all coder.

    can you teach me how to calling TCCI custom indicator,
    buy when Candlestick cross TCCI Up line
    sell when Candlestick Cross TCCI Dwon line


    i tried with funyoo code,


    int signal=0;
    if((channelsignal==false || (channelsignal && Open[shift]<ObjectGetValueByShift("HH",shift) && Close[shift]>ObjectGetValueByShift("HH",shift)))
    && (onetradeperday==false || (onetradeperday && timey!=iTime(NULL,1440,0)))
    && (tccifilter==false || (tccifilter && sell_ma_cur==EMPTY_VALUE && buy_ma_cur!=EMPTY_VALUE))
    && IsTradeContextBusy()==false)signal=1;

    if((channelsignal==false || (channelsignal && Open[shift]>ObjectGetValueByShift("LL",shift) && Close[shift]<ObjectGetValueByShift("LL",shift)))
    && (onetradeperday==false || (onetradeperday && timey!=iTime(NULL,1440,0)))
    && (tccifilter==false || (tccifilter && buy_ma_cur==EMPTY_VALUE && sell_ma_cur!=EMPTY_VALUE))
    && IsTradeContextBusy()==false)signal=2;

    but it's not working, because all line always had value (buy_ma_cur and sell_ma_cur)


    please help me
    thanks
    Hi Trint,

    It would be :

    Code:
    if(Open[shift]<ma_cur && Close[shift]>ma_cur
           && IsTradeContextBusy()==false)signal=1;
    
    if(Open[shift]>ma_cur && Close[shift]<ma_cur
            && IsTradeContextBusy()==false)signal=2;

  3. #3

    Default

    Quote Originally Posted by funyoo View Post
    Hi Trint,

    It would be :

    Code:
    if(Open[shift]<ma_cur && Close[shift]>ma_cur
           && IsTradeContextBusy()==false)signal=1;
    
    if(Open[shift]>ma_cur && Close[shift]<ma_cur
            && IsTradeContextBusy()==false)signal=2;
    Thanks Funyoo.

    it's works now,

    actually at now, with yours template ea. i try to make TCCI ea


    but i had problem with flat condition



    do you have code to analyze flat condition, so ea will not open on Flat condition market.
    please give me sample. i will add to your logic,
    thanks

  4. #4
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by Trint View Post
    Thanks Funyoo.

    it's works now,

    actually at now, with yours template ea. i try to make TCCI ea


    but i had problem with flat condition



    do you have code to analyze flat condition, so ea will not open on Flat condition market.
    please give me sample. i will add to your logic,
    thanks
    Hi Trint,

    You can add a sensibility parameter :

    Code:
    && MathAbs(ma_cur-ma_prev)>sensibility*pt

  5. #5

    Default

    Thanks funyoo
    i add MA Angle Indicator too.

    buy
    && (iOpenCS<ma_cur && icloseCS>ma_cur)
    && ((maanglesignal==false || (maanglesignal && ma>=levelup && maa<levelup)))
    && MathAbs( ma_cur- ma_prev)>(FlatRange * pt)
    sell
    &&(iOpenCS>ma_cur && icloseCS<ma_cur)
    && ((maanglesignal==false || (maanglesignal && ma<=leveldn && maa>leveldn)))
    && MathAbs( ma_cur- ma_prev)>(FlatRange * pt)
    i hope it's works.

    Thanks
    ===========
    oppss
    i get error

    2010.11.18 12:32:52 MA Angle Indicator EURUSD,H1: zero divide

    what i must to do??
    Last edited by Trint; 11-18-2010 at 05:42.

  6. #6
    bbbtrader
    Guest

    Default

    Hi Trint,

    could you post the indicator, so other people could use.

    Thank You

Similar Threads

  1. DMI indicator for MT4
    By PascalSonia in forum Indicators
    Replies: 0
    Last Post: 07-20-2015, 14:07
  2. Replies: 4
    Last Post: 01-24-2012, 04:32
  3. Replies: 8
    Last Post: 06-03-2010, 02:30
  4. Ea for this indicator...
    By Meister_Propper in forum Ideas for expert advisors
    Replies: 3
    Last Post: 12-01-2009, 08:43

Tags for this Thread

candles, candlestick, color, custom indicator, eurusd, funyoo, how to, indicator, sample, signal

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •