Slope direction line is a repainting hull or hma moving average.Cladi39 wrote: ↑Mon Oct 07, 2019 7:58 amHello mrtools im trying to do iCustom based indicator that show a signal when indicator is blue(up) and red(down), For down seems to work well, but my problem is sometimes is a up signal in red line, attached picture and code. Will be great if you can help me. Thanks soo much.
PD: maybe you can put arrows with buffers directly on indicator soo i can use it with iCustom.
Re: Coding Help
#1062Thanks Mrtools and the attached version can work?mrtools wrote: ↑Mon Oct 07, 2019 10:24 amSlope direction line is a repainting hull or hma moving average.Cladi39 wrote: ↑Mon Oct 07, 2019 7:58 amHello mrtools im trying to do iCustom based indicator that show a signal when indicator is blue(up) and red(down), For down seems to work well, but my problem is sometimes is a up signal in red line, attached picture and code. Will be great if you can help me. Thanks soo much.
PD: maybe you can put arrows with buffers directly on indicator soo i can use it with iCustom.

 Hull separate nrp mtf.mq4
 (5.85 KiB) Downloaded 31 times
Re: Coding Help
#1063That will work if you are wanting to call it from an EA just use the trend buffer #6.
Re: Coding Help
#1065mrtools
I have a question.
If I'm not mistaken, this is a snippet for nrp coloring.
There are some indicators that don't have these two lines.
Do those two lines affect nrp coloring?
I have a question.
If I'm not mistaken, this is a snippet for nrp coloring.
Code: Select all
void CleanPoint(int i,double& first[],double& second[])
{
if (i>=Bars3) return;
if ((second[i] != EMPTY_VALUE) && (second[i+1] != EMPTY_VALUE))
second[i+1] = EMPTY_VALUE;
else
if ((first[i] != EMPTY_VALUE) && (first[i+1] != EMPTY_VALUE) && (first[i+2] == EMPTY_VALUE))
first[i+1] = EMPTY_VALUE;
}
void PlotPoint(int i,double& first[],double& second[],double& from[])
{
if (i>=Bars2) return;
if (first[i+1] == EMPTY_VALUE)
if (first[i+2] == EMPTY_VALUE)
{ first[i] = from[i]; first[i+1] = from[i+1]; second[i] = EMPTY_VALUE; }
else { second[i] = from[i]; second[i+1] = from[i+1]; first[i] = EMPTY_VALUE; }
else { first[i] = from[i]; second[i] = EMPTY_VALUE; }
}
Code: Select all
if (i>=Bars3) return;
if (i>=Bars2) return;
Re: Coding Help
#1066Yes those 2 lines are added for using #property strict.ruden wrote: ↑Mon Oct 07, 2019 9:38 pmmrtools
I have a question.
If I'm not mistaken, this is a snippet for nrp coloring.There are some indicators that don't have these two lines.Code: Select all
void CleanPoint(int i,double& first[],double& second[]) { if (i>=Bars3) return; if ((second[i] != EMPTY_VALUE) && (second[i+1] != EMPTY_VALUE)) second[i+1] = EMPTY_VALUE; else if ((first[i] != EMPTY_VALUE) && (first[i+1] != EMPTY_VALUE) && (first[i+2] == EMPTY_VALUE)) first[i+1] = EMPTY_VALUE; } void PlotPoint(int i,double& first[],double& second[],double& from[]) { if (i>=Bars2) return; if (first[i+1] == EMPTY_VALUE) if (first[i+2] == EMPTY_VALUE) { first[i] = from[i]; first[i+1] = from[i+1]; second[i] = EMPTY_VALUE; } else { second[i] = from[i]; second[i+1] = from[i+1]; first[i] = EMPTY_VALUE; } else { first[i] = from[i]; second[i] = EMPTY_VALUE; } }
Do those two lines affect nrp coloring?Code: Select all
if (i>=Bars3) return; if (i>=Bars2) return;
Re: Coding Help
#1067I got it thanksmrtools wrote: ↑Tue Oct 08, 2019 1:14 amYes those 2 lines are added for using #property strict.ruden wrote: ↑Mon Oct 07, 2019 9:38 pmmrtools
I have a question.
If I'm not mistaken, this is a snippet for nrp coloring.There are some indicators that don't have these two lines.Code: Select all
void CleanPoint(int i,double& first[],double& second[]) { if (i>=Bars3) return; if ((second[i] != EMPTY_VALUE) && (second[i+1] != EMPTY_VALUE)) second[i+1] = EMPTY_VALUE; else if ((first[i] != EMPTY_VALUE) && (first[i+1] != EMPTY_VALUE) && (first[i+2] == EMPTY_VALUE)) first[i+1] = EMPTY_VALUE; } void PlotPoint(int i,double& first[],double& second[],double& from[]) { if (i>=Bars2) return; if (first[i+1] == EMPTY_VALUE) if (first[i+2] == EMPTY_VALUE) { first[i] = from[i]; first[i+1] = from[i+1]; second[i] = EMPTY_VALUE; } else { second[i] = from[i]; second[i+1] = from[i+1]; first[i] = EMPTY_VALUE; } else { first[i] = from[i]; second[i] = EMPTY_VALUE; } }
Do those two lines affect nrp coloring?Code: Select all
if (i>=Bars3) return; if (i>=Bars2) return;