Re: Coding Help

1491
alpha24 wrote: Fri Jun 02, 2023 4:10 am No see this please

it is just like Woodie's CCI .
Image
I post HERE simple version, test it and if you want some extras, write it...


Re: Coding Help

1492
mrtools wrote: Fri Jun 02, 2023 4:34 am Nothing if you don't want to use it in a mtf way otherwise you can put a time frame you want or maybe something like

for external parameters

Code: Select all

input int barsToUse = 1;
enum enTimeFrames
{
         tf_cu  = 0,                                               // Current time frame
         tf_m1  = PERIOD_M1,                                       // 1 minute
         tf_m5  = PERIOD_M5,                                       // 5 minutes
         tf_m15 = PERIOD_M15,                                      // 15 minutes
         tf_m30 = PERIOD_M30,                                      // 30 minutes
         tf_h1  = PERIOD_H1,                                       // 1 hour
         tf_h4  = PERIOD_H4,                                       // 4 hours
         tf_d1  = PERIOD_D1,                                       // Daily
         tf_w1  = PERIOD_W1,                                       // Weekly
         tf_mn1 = PERIOD_MN1,                                      // Monthly
         tf_n1  = -1,                                              // First higher time frame
         tf_n2  = -2,                                              // Second higher time frame
         tf_n3  = -3                                               // Third higher time frame
      };
input enTimeFrames            inpTimeFrame     = tf_cu;            // Time frame to use 
and for indicator call

Code: Select all

longTrend= iCustom(NULL,0,"! G Channel (mtf + alerts + arrows + candles + btn)",[b]inpTimeFrame[/b],"gc b1",200,0,0,true,2,clrRed,clrLime,true,1,3,3,6,clrMediumSeaGreen,clrOrangeRed,clrDimGray,false,false,false,false,false,false,false,2,2,10,10,1.0.1.0,clrDodgerBlue,clrSandyBrown,true,0,1,35,35,80,22,"Arial",10,clrBlack,clrDimGray,clrLime,"G Chan",14,barsToUse)


To be honest haven't done an EA this way but it should work.
Here is the EA using G channel as trend indicator and MTF option along with stepRSI as a pullback entry.
I used the Buffer8 as trend filter for G channel as Buffer14 did not work.
I am attaching the indicators and EA mql4 code here.
I am still working out profitable settings but this code for G channel is working for an EA.

Re: Coding Help

1493
kkfx wrote: Sun Jun 04, 2023 6:01 am Here is the EA using G channel as trend indicator and MTF option along with stepRSI as a pullback entry.
I used the Buffer8 as trend filter for G channel as Buffer14 did not work.
I am attaching the indicators and EA mql4 code here.
I am still working out profitable settings but this code for G channel is working for an EA.
Image
Can you explain exactly how you are using the g channel and step rsi in this ea, can probably make you a simple g channel and step rsi for you to use in an ea, that wouldn't require all those iCustom calls that are not needed. No offence, but with the candles (4 buffers), the outer channels (2 buffers), the colored lines (6 buffers), and the arrows (2 buffers) then the trend buffer after that, there is no way buffer 8 is the trend buffer, probably something wrong in your iCustom call.

Re: Coding Help

1494
mrtools wrote: Sun Jun 04, 2023 6:34 am Can you explain exactly how you are using the g channel and step rsi in this ea, can probably make you a simple g channel and step rsi for you to use in an ea, that wouldn't require all those iCustom calls that are not needed. No offence, but with the candles (4 buffers), the outer channels (2 buffers), the colored lines (6 buffers), and the arrows (2 buffers) then the trend buffer after that, that buffer 8 is the trend buffer, probably something wrong in your iCustom call.
I am using stepRSI cross below40 or above60 when G channel trend matches. This takes entry around middle of the channel in direction of trend.
I used iCustom call for G channel as 1 or -1 for Buffer14, but did not work . So used buffer8.
Let me know if better way to do that or a modified G channel for EA.
Thanks.

Re: Coding Help

1495
kkfx wrote: Sun Jun 04, 2023 6:59 am I am using stepRSI cross below40 or above60 when G channel trend matches. This takes entry around middle of the channel in direction of trend.
I used iCustom call for G channel as 1 or -1 for Buffer14, but did not work . So used buffer8.
Let me know if better way to do that or a modified G channel for EA.
Thanks.
Is the g channel mtf and are you just using close price without pre-smoothing? Will do a lightened version for your EA.


Re: Coding Help

1496
mrtools wrote: Sun Jun 04, 2023 7:06 am Is the g channel mtf and are you just using close price without pre-smoothing? Will do a lightened version for your EA.
Thank you... I want to use MTF G channel without presmooting and close price breakout of G channel lines.

Re: Coding Help

1498
mrtools wrote: Mon Jun 05, 2023 12:47 am Did this version it's just the g channel ma with a choice of slope color or close price crossing the ma. On this version the trend buffer is #5.
Image
Thanks for taking time for writing extra indicator.
I checked the values of Buffer5 in Data window but it shows no value...

iCustom(NULL,0,"",........,5,0) ==1 or -1 for long or short trend

Is this the right expression?

Re: Coding Help

1499
kkfx wrote: Mon Jun 05, 2023 4:41 am Thanks for taking time for writing extra indicator.
I checked the values of Buffer5 in Data window but it shows no value...

iCustom(NULL,0,"",........,5,0) ==1 or -1 for long or short trend

Is this the right expression?
Yes.


Who is online

Users browsing this forum: CommonCrawl [Bot] and 2 guests