Re: CCI indicators for MT4

712
mrtools wrote: Sun Jan 14, 2024 4:12 pm No I posted the filtered version, added the filter conditions you asked for on slope change only.
i can see on chart lot of arrows see snap, :(
as per rule its very few suppose to visible on chart
see rule filter arrow marked for DN
simple way we can say.. DOWN ARROW MUST BE ON BULLISH BAR
UP ARROW MUST BE ON BEARISH BAR
if we select mode for SLOPE direction of CCI in settings
Attachments
"There is NO GOD higher than TRUTH" - Mahatma Gandhi

Re: CCI indicators for MT4

714
sal wrote: Sun Jan 14, 2024 4:38 pm i can see on chart lot of arrows see snap, :(
as per rule its very few suppose to visible on chart
see rule filter arrow marked for DN
simple way we can say.. DOWN ARROW MUST BE ON BULLISH BAR
UP ARROW MUST BE ON BEARISH BAR
if we select mode for SLOPE direction of CCI in settings
Simply change in lines 210 - 212

Code: Select all

 case col_colorOnSlope: 
                    if (cci[i]>cci[i+1] && Open[i]<Close[i])  trend[i] =  1;
                    if (cci[i]<cci[i+1] && Open[i]>Close[i])  trend[i] = -1;
to

Code: Select all

 case col_colorOnSlope: 
                    if (cci[i]>cci[i+1] && Open[i]>Close[i])  trend[i] =  1;
                    if (cci[i]<cci[i+1] && Open[i]<Close[i])  trend[i] = -1;
Far as I'm aware bullish/bearish bar is open<>close.
These users thanked the author mrtools for the post (total 2):
josi, sal

Re: CCI indicators for MT4

715
mrtools wrote: Mon Jan 15, 2024 12:56 am Simply change in lines 210 - 212

Code: Select all

 case col_colorOnSlope: 
                    if (cci[i]>cci[i+1] && Open[i]<Close[i])  trend[i] =  1;
                    if (cci[i]<cci[i+1] && Open[i]>Close[i])  trend[i] = -1;
to

Code: Select all

 case col_colorOnSlope: 
                    if (cci[i]>cci[i+1] && Open[i]>Close[i])  trend[i] =  1;
                    if (cci[i]<cci[i+1] && Open[i]<Close[i])  trend[i] = -1;
Far as I'm aware bullish/bearish bar is open<>close.
thanks bro.. now its updated <3
These users thanked the author sal for the post:
zangar
"There is NO GOD higher than TRUTH" - Mahatma Gandhi


Re: CCI indicators for MT4

719
mrtools wrote: Mon Jan 15, 2024 2:25 am mr.tools
some places the arrows are not appear.. and after replace the close, the slope colour change...
see snap
before and after
mrtools wrote: Mon Jan 15, 2024 2:25 am My bad, my idea messed with the cci slope coloring, right now off the top of my head not sure how to do this just using slope coloring.
bro..
i think its based on BULL COLOUR AND BEAR COLOUR of price.
i find code model from indicator which works well

extern color BullCol = clrRed; //clrGreen;
extern color BearCol = clrGreen; //clrRed;
IndicatorBuffers(2);
SetIndexBuffer(0,buffer1);
SetIndexStyle(0,DRAW_ARROW,0,0,BullCol);
SetIndexArrow(0,upCode);
SetIndexBuffer(1,buffer2);
SetIndexStyle(1,DRAW_ARROW,0,0,BearCol);
SetIndexArrow(1,dnCode);

buffer1[i] = iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,BullCol,BearCol,gap,upCode,dnCode,0,y);
buffer2[i] = iCustom(NULL,TimeFrame,indicatorFileName,PERIOD_CURRENT,BullCol,BearCol,gap,upCode,dnCode,1,y);
"There is NO GOD higher than TRUTH" - Mahatma Gandhi


Who is online

Users browsing this forum: alex4x, Applebot [Crawler], Bing [Bot], ChatGPT [Bot], DAMPro69, EVGENIY86, kvak, PaperLi [Bot], RodrigoRT7, rudiarius and 209 guests