Attachments forums

List of attachments posted on this forum.


All files on forums: 134208

Re: BeatlemaniaSA's XU-Hybrid Trading System

global, Mon Feb 07, 2022 3:34 am

Here is the CCI - nrp advanced(mtf + alerts + arrows) histo.mq4 which is a modification of the CCI - nrp advanced(mtf + alerts + arrows).mq4 from app.php/attach/file/3319474 with a new ShowHistogram option that displays the CCI as a histogram just as it is displayed with the TrueTL MTF CCI.ex4 indicator. The ShowHistogram option is the last option in the list of options.

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
   }
In the GBPNZD M5 screenshot below, the top sub-window shows the indicator with ShowHistogram=false, CCI Period=14, CCIPrice=Typical, and Jurik smooth length=5 as in the original indicator.


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);
Whether the ShowHistogram is true of false, the bias buffer gives the same readings.

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.
All files in topic