Coding help - page 712 1...705706707708709710711712713714715716717718719...792 New comment baraozemo 2016.11.16 14:21 #7111 mladen: The method is exactly the same - just change the target window in the ChartIndicatorAdd() to be 0 Hi mladen, thanks for the reply... I was studying here.. ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle);where (1) top window CharGetInteger(1=>top window)where (0) below ChartIndicatorAdd(0,(int)ChartGetInteger(0,CHART_WINDOWS_TOTAL),RSI1Handle);CharGetInteger(0=>below)not easy to discovery this.. lolnow I trying to put different color in the MA Grid maker 1.1 Questions from Beginners MQL5 Libraries: Expert Mladen Rakic 2016.11.16 14:35 #7112 baraozemo: Hi mladen, thanks for the reply... I was studying here.. ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle);where (1) top window CharGetInteger(1=>top window)where (0) below ChartIndicatorAdd(0,(int)ChartGetInteger(0,CHART_WINDOWS_TOTAL),RSI1Handle);CharGetInteger(0=>below)not easy to discovery this.. lolnow I trying to put different color in the MA Like thisChartIndicatorAdd(0,0,MA1Handle); baraozemo 2016.11.16 15:09 #7113 mladen: Like thisChartIndicatorAdd(0,0,MA1Handle); the question about put the indicator on the top or below , as I said , I discovered... ChartIndicatorAdd(0,1,MA1Handle); (top) ChartIndicatorAdd(0,2,RS1Handle); (below) the actual problems: 1) now I'm tryng to apply different color to the MA's2) and solve a problem to release the MA's from the graphics (the RSI's and the WPR are cleaned correctly.. )for example... the RSI1,RSI2,RSI3 and WPR is cleaned correctly but the MA1,MA2,MA3 is not cleaned... int OnInit() { if (_Period==Signal_0_MA_Timeframe) { MA1Handle = iMA(_Symbol,Signal_0_MA_Timeframe,Signal_0_MA_PeriodMA,Signal_0_MA_Shift,Signal_0_MA_Method,Signal_0_MA_Applied); if (MA1Handle!=INVALID_HANDLE) ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle); //return(INIT_SUCCEEDED); } //---adicionando MA2 if (_Period==Signal_1_MA_Timeframe) { MA2Handle = iMA(_Symbol,Signal_1_MA_Timeframe,Signal_1_MA_PeriodMA,Signal_1_MA_Shift,Signal_1_MA_Method,Signal_1_MA_Applied); if (MA2Handle!=INVALID_HANDLE) ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA2Handle); //return(INIT_SUCCEEDED); } ===============================//===========================//+------------------------------------------------------------------+//| Deinitialization function of the expert |//+------------------------------------------------------------------+void OnDeinit(const int reason) { //limpa do gráfico os indicadores RSI e WPR for (int w = (int)ChartGetInteger(0,CHART_WINDOWS_TOTAL); w>=0; w--) { string name = ChartIndicatorName(0,w,0); if (StringFind(name,"RSI(",0)==0) ChartIndicatorDelete(0,w,name); if (StringFind(name,"%R(",0)==0) ChartIndicatorDelete(0,w,name); if (StringFind(name,"Moving Average(",0)==0) ChartIndicatorDelete(0,w,name); } ExtExpert.Deinit(); } Combining output to main Errors, bugs, questions Discussion of article "How Mladen Rakic 2016.11.16 15:29 #7114 baraozemo: the question about put the indicator on the top or below , as I said , I discovered... ChartIndicatorAdd(0,1,MA1Handle); (top) ChartIndicatorAdd(0,2,RS1Handle); (below) the actual problems: 1) now I'm tryng to apply different color to the MA's2) and solve a problem to release the MA's from the graphics (the RSI's and the WPR are cleaned correctly.. )for example... the RSI1,RSI2,RSI3 and WPR is cleaned correctly but the MA1,MA2,MA3 is not cleaned... int OnInit() { if (_Period==Signal_0_MA_Timeframe) { MA1Handle = iMA(_Symbol,Signal_0_MA_Timeframe,Signal_0_MA_PeriodMA,Signal_0_MA_Shift,Signal_0_MA_Method,Signal_0_MA_Applied); if (MA1Handle!=INVALID_HANDLE) ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle); //return(INIT_SUCCEEDED); } //---adicionando MA2 if (_Period==Signal_1_MA_Timeframe) { MA2Handle = iMA(_Symbol,Signal_1_MA_Timeframe,Signal_1_MA_PeriodMA,Signal_1_MA_Shift,Signal_1_MA_Method,Signal_1_MA_Applied); if (MA2Handle!=INVALID_HANDLE) ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA2Handle); //return(INIT_SUCCEEDED); } ===============================//===========================//+------------------------------------------------------------------+//| Deinitialization function of the expert |//+------------------------------------------------------------------+void OnDeinit(const int reason) { //limpa do gráfico os indicadores RSI e WPR for (int w = (int)ChartGetInteger(0,CHART_WINDOWS_TOTAL); w>=0; w--) { string name = ChartIndicatorName(0,w,0); if (StringFind(name,"RSI(",0)==0) ChartIndicatorDelete(0,w,name); if (StringFind(name,"%R(",0)==0) ChartIndicatorDelete(0,w,name); if (StringFind(name,"Moving Average(",0)==0) ChartIndicatorDelete(0,w,name); } ExtExpert.Deinit(); } Sine moving average has only a name "Moving average" you can not uniquely identify it, so you can not safely delete it Kostumer27 2016.11.16 19:25 #7115 Mladen, 1) please help make round digits in iCustom to 0.1 or 0.01 maximum. and explain, please how to insert "value2" (or3) instead of default indicator mean?iCustom(symbolName,PeriodMinutes,"_1_IFT 2-1",0,i) ALI 2016.11.16 19:48 #7116 HELLO mr mladeni run this indicator{ssa_squeeze_of_averages_mtf_amp_alerts_2.mq4} but it can't show any thingcould you fix itbest regard and could you make MTF of this indicator: ma_count_amp_alerts.mq4MTF similar this histogram: Files: ssa_squeeze_of_averages_mtf_amp_alerts_2.mq4 35 kb ma_count_amp_alerts.mq4 5 kb Mladen Rakic 2016.11.16 20:18 #7117 bilbao: HELLO mr mladeni run this indicator{ssa_squeeze_of_averages_mtf_amp_alerts_2.mq4} but it can't show any thingcould you fix itbest regard and could you make MTF of this indicator: ma_count_amp_alerts.mq4MTF similar this histogram: You need "SSA of price" for the ssa_squeeze ... to work Mladen Rakic 2016.11.16 20:23 #7118 kostumer27: Mladen, 1) please help make round digits in iCustom to 0.1 or 0.01 maximum. and explain, please how to insert "value2" (or3) instead of default indicator mean?iCustom(symbolName,PeriodMinutes,"_1_IFT 2-1",0,i) Depends on the parameters list of the indicator, but you have to pass the parameters in between the indicator name and the buffer numberSomething like this : iCustom(symbolName,PeriodMinutes,"_1_IFT-1",yourParameter1,yourParameter2,yourParameter3,yourParameter9999,0,i) The other part, I do not understandIf you mean hot to limit the return values, you can not do that. You can only limit the value assigned to something from the iCustom() call, like this double result = MathMax(MathMin(iCustom(symbolName,PeriodMinutes,"_1_IFT 2-1",0,i),0.1),0.01); Reading indicator buffers set EA, how to get Max external parameters for ALI 2016.11.16 20:57 #7119 mladen: You need "SSA of price" for the ssa_squeeze ... to work thanks.now it work ALI 2016.11.16 20:58 #7120 mr mladen :could make MTF of itsimilar this picture histogrambest regard Files: ma_count_amp_alerts.mq4 5 kb 1...705706707708709710711712713714715716717718719...792 New comment
The method is exactly the same - just change the target window in the ChartIndicatorAdd() to be 0
Hi mladen, thanks for the reply... I was studying here..
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle);where (1) top window
where (0) below
ChartIndicatorAdd(0,(int)ChartGetInteger(0,CHART_WINDOWS_TOTAL),RSI1Handle);now I trying to put different color in the MA
Hi mladen, thanks for the reply... I was studying here..
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle);where (1) top window
where (0) below
ChartIndicatorAdd(0,(int)ChartGetInteger(0,CHART_WINDOWS_TOTAL),RSI1Handle);now I trying to put different color in the MA
Like this
Like this
the question about put the indicator on the top or below , as I said , I discovered...
ChartIndicatorAdd(0,1,MA1Handle); (top)
ChartIndicatorAdd(0,2,RS1Handle); (below)
the actual problems:
1) now I'm tryng to apply different color to the MA's
2) and solve a problem to release the MA's from the graphics (the RSI's and the WPR are cleaned correctly.. )
for example...
the RSI1,RSI2,RSI3 and WPR is cleaned correctly but the MA1,MA2,MA3 is not cleaned...
int OnInit()
{
if (_Period==Signal_0_MA_Timeframe)
{
MA1Handle = iMA(_Symbol,Signal_0_MA_Timeframe,Signal_0_MA_PeriodMA,Signal_0_MA_Shift,Signal_0_MA_Method,Signal_0_MA_Applied);
if (MA1Handle!=INVALID_HANDLE)
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle);
//return(INIT_SUCCEEDED);
}
//---adicionando MA2
if (_Period==Signal_1_MA_Timeframe)
{
MA2Handle = iMA(_Symbol,Signal_1_MA_Timeframe,Signal_1_MA_PeriodMA,Signal_1_MA_Shift,Signal_1_MA_Method,Signal_1_MA_Applied);
if (MA2Handle!=INVALID_HANDLE)
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA2Handle);
//return(INIT_SUCCEEDED);
}
===============================//===========================
//+------------------------------------------------------------------+
//| Deinitialization function of the expert |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//limpa do gráfico os indicadores RSI e WPR
for (int w = (int)ChartGetInteger(0,CHART_WINDOWS_TOTAL); w>=0; w--)
{
string name = ChartIndicatorName(0,w,0);
if (StringFind(name,"RSI(",0)==0)
ChartIndicatorDelete(0,w,name);
if (StringFind(name,"%R(",0)==0)
ChartIndicatorDelete(0,w,name);
if (StringFind(name,"Moving Average(",0)==0)
ChartIndicatorDelete(0,w,name);
}
ExtExpert.Deinit();
}
the question about put the indicator on the top or below , as I said , I discovered...
ChartIndicatorAdd(0,1,MA1Handle); (top)
ChartIndicatorAdd(0,2,RS1Handle); (below)
the actual problems:
1) now I'm tryng to apply different color to the MA's
2) and solve a problem to release the MA's from the graphics (the RSI's and the WPR are cleaned correctly.. )
for example...
the RSI1,RSI2,RSI3 and WPR is cleaned correctly but the MA1,MA2,MA3 is not cleaned...
int OnInit()
{
if (_Period==Signal_0_MA_Timeframe)
{
MA1Handle = iMA(_Symbol,Signal_0_MA_Timeframe,Signal_0_MA_PeriodMA,Signal_0_MA_Shift,Signal_0_MA_Method,Signal_0_MA_Applied);
if (MA1Handle!=INVALID_HANDLE)
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA1Handle);
//return(INIT_SUCCEEDED);
}
//---adicionando MA2
if (_Period==Signal_1_MA_Timeframe)
{
MA2Handle = iMA(_Symbol,Signal_1_MA_Timeframe,Signal_1_MA_PeriodMA,Signal_1_MA_Shift,Signal_1_MA_Method,Signal_1_MA_Applied);
if (MA2Handle!=INVALID_HANDLE)
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),MA2Handle);
//return(INIT_SUCCEEDED);
}
===============================//===========================
//+------------------------------------------------------------------+
//| Deinitialization function of the expert |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//limpa do gráfico os indicadores RSI e WPR
for (int w = (int)ChartGetInteger(0,CHART_WINDOWS_TOTAL); w>=0; w--)
{
string name = ChartIndicatorName(0,w,0);
if (StringFind(name,"RSI(",0)==0)
ChartIndicatorDelete(0,w,name);
if (StringFind(name,"%R(",0)==0)
ChartIndicatorDelete(0,w,name);
if (StringFind(name,"Moving Average(",0)==0)
ChartIndicatorDelete(0,w,name);
}
ExtExpert.Deinit();
}
Mladen, 1) please help make round digits in iCustom to 0.1 or 0.01 maximum.
and explain, please how to insert "value2" (or3) instead of default indicator mean?
iCustom(symbolName,PeriodMinutes,"_1_IFT 2-1",0,i)
HELLO mr mladen
i run this indicator{ssa_squeeze_of_averages_mtf_amp_alerts_2.mq4} but it can't show any thing
could you fix it
best regard
and could you make MTF of this indicator: ma_count_amp_alerts.mq4
MTF similar this histogram:
HELLO mr mladen
i run this indicator{ssa_squeeze_of_averages_mtf_amp_alerts_2.mq4} but it can't show any thing
could you fix it
best regard
and could you make MTF of this indicator: ma_count_amp_alerts.mq4
MTF similar this histogram:
Mladen, 1) please help make round digits in iCustom to 0.1 or 0.01 maximum.
and explain, please how to insert "value2" (or3) instead of default indicator mean?
iCustom(symbolName,PeriodMinutes,"_1_IFT 2-1",0,i)
Depends on the parameters list of the indicator, but you have to pass the parameters in between the indicator name and the buffer number
Something like this :
The other part, I do not understand
If you mean hot to limit the return values, you can not do that. You can only limit the value assigned to something from the iCustom() call, like this
You need "SSA of price" for the ssa_squeeze ... to work
thanks.
now it work
mr mladen :
could make MTF of it
similar this picture histogram
best regard