The timeframe option includes First higher time frame, Second higher time frame, Third higher time frame choices as well as "Auto higher time frame1" and "Auto higher time frame2" choices.
Auto higher time frame1 displays the following higher timeframes depending on which timeframe you are currently on. To change the higher time frames that are display just change it in the code as shown below and recompile the indicator.
For example if you choose "Auto higher time frame1", when you are on the 5 minute timeframe the 15 minute timeframe CCI histogram will be displayed as shown in the Get the auto higher timeframe1" code below if(Per==5) _tf=15. However, if you choose "Auto higher time frame2", when you are on the 5 minute timeframe the 60 minute timeframe CCI histogram will be displayed as shown in the "Get the auto higher timeframe2" code below if(Per==5) _tf=60.
Code: Select all
if(_tf==-4) //Get the auto higher timeframe1
{
if(Per==1) _tf=5; // 1 minute, M1
if(Per==5) _tf=15; // 5 minute, M5
if(Per==15) _tf=60; // 15 minutes, M15
if(Per==30) _tf=60; // 30 minutes, M30
if(Per==60) _tf=240; // 60 minutes, H1
if(Per==240) _tf=1440; // 240 minutes, H4
if(Per==1440) _tf=10080; // 1440 minutes, D1
if(Per==10080) _tf=43200; // 10080 minutes, W1
if(Per==43200) _tf=43200; // 43200 minutes, MN
}
if(_tf==-5) //Get the auto higher timeframe2
{
if(Per==1) _tf=15; // 1 minute, M1
if(Per==5) _tf=60; // 5 minute, M5
if(Per==15) _tf=240; // 15 minutes, M15
if(Per==30) _tf=240; // 30 minutes, M30
if(Per==60) _tf=1440; // 60 minutes, H1
if(Per==240) _tf=1440; // 240 minutes, H4
if(Per==1440) _tf=10080; // 1440 minutes, D1
if(Per==10080) _tf=43200; // 10080 minutes, W1
if(Per==43200) _tf=43200; // 43200 minutes, MN
}
The second and third sub-windows show the indicator with its new default settings, ShowHistogram=true, CCI Period=5, CCIPrice=Close, and Jurik smooth length=0 and Time frame=Auto higher time frame1 and Time Frame=Auto higher time frame2 respectively to match the TrueTL MTF CCI.ex4 indicator settings and display.
It also has a bias buffer number 11 that you can use to get the buy or sell bias of the histogram by iCustom calls for use in an EA as in this sample code below.
Code: Select all
string indyCCImtf="indyCCImtf";
double CCI_bias=iCustom(NULL,0,indyCCImtf,PERIOD_H4,11,0);
bias=1 when the cci < the zero line and increasing
bias=2 when the cci > the zero line and increasing
bias=-1 when the cci > the zero line and decreasing
bias=-2 when the cci < the zero line and decreasing
One last thing, the OverBought and Oversold colors, all arrows and alerts are switched off when you use ShowHistogram=true option and or select any higher time frame. I hope you all find this ShowHistogram modification useful.
Note: After some trial and error I found that the settings, Jurik smooth length=3 and Jurik smooth phase=100 worked best for making good trade entries. Jurik smooth length=0 and Jurik smooth phase=0 made the indicator too sensitive. You can experiment with the setting to see what works best for you.