Thanks soo much Mrtools. I use buffer 0 this way and work soo well.mrtools wrote: Mon Oct 07, 2019 11:52 am
That will work if you are wanting to call it from an EA just use the trend buffer #6.
Re: Coding Help
1062mrtools
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>=Bars-3) 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>=Bars-2) 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>=Bars-3) return;
if (i>=Bars-2) return;
Re: Coding Help
1063Yes those 2 lines are added for using #property strict.ruden wrote: Mon Oct 07, 2019 9:38 pm mrtools
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>=Bars-3) 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>=Bars-2) 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>=Bars-3) return; if (i>=Bars-2) return;
Re: Coding Help
1065Dear coders,
Please Help. I am not from coding / programming background.
What code / line should I add in Indicator file so that I get Timeframe selected ( i.e. H1, H4 etc ) ( in respective Indi )
plotted above / below on up / down arrows in any indicator.
or
What code / line should I add in Indicator file so that I get TEXT selected ( Input : Text ) ( in respective Indi )
plotted above / below on up / down arrows in any indicator.
Please Share Code.
Thanks.
Please Help. I am not from coding / programming background.
What code / line should I add in Indicator file so that I get Timeframe selected ( i.e. H1, H4 etc ) ( in respective Indi )
plotted above / below on up / down arrows in any indicator.
or
What code / line should I add in Indicator file so that I get TEXT selected ( Input : Text ) ( in respective Indi )
plotted above / below on up / down arrows in any indicator.
Please Share Code.
Thanks.
Re: Coding Help
1066
Dear experts,
I was trying to code a simple EA with the "Super smoothed average trend 1.2" by Jimmy, which is an indicator in the Top 10 NRP indicators list in here (attached below for ease of access). The idea is to make a buy order when the indicator turns Green (by default) and sell order vice versa. I was trying to find the indicator values using iCustom function during backtesting as shown below.
When I execute this, it returns Empty_Value in Line Index 2 and 3, while the rest of them are zero. I tried using backtest data where the indicator shows green, as well as red, but the return values did not change at all.
Any help would be highly appreciated. Thank you very much for your time.
I was trying to code a simple EA with the "Super smoothed average trend 1.2" by Jimmy, which is an indicator in the Top 10 NRP indicators list in here (attached below for ease of access). The idea is to make a buy order when the indicator turns Green (by default) and sell order vice versa. I was trying to find the indicator values using iCustom function during backtesting as shown below.
Code: Select all
#include <stdlib.mqh>
extern int AvgPeriod1 = 34;
extern ENUM_APPLIED_PRICE AvgPrice1 = PRICE_CLOSE;
void OnTick()
{
double CustomIndi0 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 0, 1);
Print("The value of Indicator Buffer 0 is: ", CustomIndi0);
double CustomIndi1 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 1, 1);
Print("The value of Indicator Buffer 1 is: ", CustomIndi1);
double CustomIndi2 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 2, 1);
Print("The value of Indicator Buffer 2 is: ", CustomIndi2);
double CustomIndi3 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 3, 1);
Print("The value of Indicator Buffer 3 is: ", CustomIndi3);
double CustomIndi4 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 4, 1);
Print("The value of Indicator Buffer 4 is: ", CustomIndi4);
double CustomIndi5 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 5, 1);
Print("The value of Indicator Buffer 5 is: ", CustomIndi5);
double CustomIndi6 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 6, 1);
Print("The value of Indicator Buffer 6 is: ", CustomIndi6);
double CustomIndi7 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 7, 1);
Print("The value of Indicator Buffer 7 is: ", CustomIndi7);
double CustomIndi8 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 8, 1);
Print("The value of Indicator Buffer 8 is: ", CustomIndi8);
}
Any help would be highly appreciated. Thank you very much for your time.
Re: Coding Help
1067Would make a wild guess it is using buffer#3 which would be the trend buffer, which would be if trend = 1 = buy and trend =-1 = sell.schemman wrote: Tue Nov 19, 2019 10:01 am Dear experts,
I was trying to code a simple EA with the "Super smoothed average trend 1.2" by Jimmy, which is an indicator in the Top 10 NRP indicators list in here (attached below for ease of access). The idea is to make a buy order when the indicator turns Green (by default) and sell order vice versa. I was trying to find the indicator values using iCustom function during backtesting as shown below.
When I execute this, it returns Empty_Value in Line Index 2 and 3, while the rest of them are zero. I tried using backtest data where the indicator shows green, as well as red, but the return values did not change at all.Code: Select all
#include <stdlib.mqh> extern int AvgPeriod1 = 34; extern ENUM_APPLIED_PRICE AvgPrice1 = PRICE_CLOSE; void OnTick() { double CustomIndi0 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 0, 1); Print("The value of Indicator Buffer 0 is: ", CustomIndi0); double CustomIndi1 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 1, 1); Print("The value of Indicator Buffer 1 is: ", CustomIndi1); double CustomIndi2 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 2, 1); Print("The value of Indicator Buffer 2 is: ", CustomIndi2); double CustomIndi3 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 3, 1); Print("The value of Indicator Buffer 3 is: ", CustomIndi3); double CustomIndi4 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 4, 1); Print("The value of Indicator Buffer 4 is: ", CustomIndi4); double CustomIndi5 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 5, 1); Print("The value of Indicator Buffer 5 is: ", CustomIndi5); double CustomIndi6 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 6, 1); Print("The value of Indicator Buffer 6 is: ", CustomIndi6); double CustomIndi7 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 7, 1); Print("The value of Indicator Buffer 7 is: ", CustomIndi7); double CustomIndi8 = iCustom(Symbol(), 15, "Super smoothed average trend 1.2", AvgPeriod1, AvgPrice1, 8, 1); Print("The value of Indicator Buffer 8 is: ", CustomIndi8); }
Any help would be highly appreciated. Thank you very much for your time.
Re: Coding Help
1068mrtools wrote: Tue Nov 19, 2019 11:36 am
Would make a wild guess it is using buffer#3 which would be the trend buffer, which would be if trend = 1 = buy and trend =-1 = sell.
Thank you very much for responding, MrTools.

Re: Coding Help
1069Good Day mrtools
Please help look into the attached indicators code, it takes too long to calculate and load on the chart, also slow down the MT4
kindly help fix this bug
thanks.
Olayemi.
Please help look into the attached indicators code, it takes too long to calculate and load on the chart, also slow down the MT4
kindly help fix this bug
thanks.
Olayemi.
Re: Coding Help
1070Hi the indicator uses these indicators listed to work well, make sure you have in the index folder with the exact names.OLAYEMI8 wrote: Fri Dec 13, 2019 3:03 am Good Day mrtools
Please help look into the attached indicators code, it takes too long to calculate and load on the chart, also slow down the MT4
kindly help fix this bug
thanks.
Olayemi.
It doesn't work well, you have to know originally if it worked well.
NonLag Inverse fisher transform of RSX
Fisher_Yur4ik_2
TMA+CG mladen
ZeroLAG_MA