Hi mladen,
I use this component in my template and in a test EA...
but while in graphic it has some glitches (the component is slow and does not update the screen correctly)
and while using the EA also gives the same problem and also leaves the backtest very very slow...
Could you help me to optimize and fix this component it's crucial to me?
Re: Metatrader 5 Versions of indicators.
62The BarsCalculated() returns the number of calculated bars - not the not calculated/changedbaraozemo wrote: Sat Apr 22, 2017 4:22 am Hi mladen,
I use this component in my template and in a test EA...
but while in graphic it has some glitches (the component is slow and does not update the screen correctly)
and while using the EA also gives the same problem and also leaves the backtest very very slow...
Could you help me to optimize and fix this component it's crucial to me?
The correct math for the new calculated bars should be Bars(_Symbol,_Period)-BarsCalculated(handle);
Try that out
Dsl macd
63New metatrader 5 version of dsl macd posted here : https://www.forex-station.com/viewtopic ... 1295350565
Re: Metatrader 5 Versions of indicators.
64Hi,
I need help with bb.
I want to detect the "bollingers bands" opening in the mt5, (see graphic)
the code samples that I have only get Touch or break in bb with the price, but it's not I need,
I need to get the "BB" opening like in this graphic.
I need help with bb.
I want to detect the "bollingers bands" opening in the mt5, (see graphic)
the code samples that I have only get Touch or break in bb with the price, but it's not I need,
I need to get the "BB" opening like in this graphic.
Code: Select all
int m_BBHand;
double m_BBup[];
double m_BBlow[];
double m_BBmidle[];
MqlRates m_BBrate[]; // To be used to store the prices, volumes and spread of each bar
int OnInit()
{
m_BBHand=iBands(_Symbol,BB_TimeFrame,BB_Period,BB_Shift,BB_deviation,PRICE_CLOSE);
ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),m_BBHand);
}
void OnTick()
{
ArraySetAsSeries(m_BBrate,true);
ZeroMemory(m_BBup);
ZeroMemory(m_BBlow);
ZeroMemory(m_BBmidle);
ArraySetAsSeries(m_BBup,true);
ArraySetAsSeries(m_BBlow,true);
ArraySetAsSeries(m_BBmidle,true);
if(CopyRates(_Symbol,BB_TimeFrame,0,3,m_BBrate)<0)
{
return(false);
}
if(CopyBuffer(m_BBHand,0,1,3,m_BBmidle)<0 ||
CopyBuffer(m_BBHand,1,1,3,m_BBup)<0 ||
CopyBuffer(m_BBHand,2,1,3,m_BBlow)<0)
{
return(false);
}
}
bool buyreg,sellreg=false;
//but this code get candle crossing the bands (and it's not that I need)
///I need is only to get the "bands opening" (see the attached graphic)
buyreg=m_BBrate[1].close>m_BBlow[1] && m_BBrate[1].open<m_BBlow[1];// White (bull) candle crossed the Lower Band from below to above
sellreg=m_BBrate[1].close<m_BBup[1]&& m_BBrate[1].open>m_BBup[1];// Black (bear) candle crossed the Upper Band from above to below
}
Re: Metatrader 5 Versions of indicators.
65baraozemobaraozemo wrote: Wed Apr 26, 2017 5:18 am Hi,
I need help with bb.
I want to detect the "bollingers bands" opening in the mt5, (see graphic)
the code samples that I have only get Touch or break in bb with the price, but it's not I need,
I need to get the "BB" opening like in this graphic.
Snap1.pngCode: Select all
int m_BBHand; double m_BBup[]; double m_BBlow[]; double m_BBmidle[]; MqlRates m_BBrate[]; // To be used to store the prices, volumes and spread of each bar int OnInit() { m_BBHand=iBands(_Symbol,BB_TimeFrame,BB_Period,BB_Shift,BB_deviation,PRICE_CLOSE); ChartIndicatorAdd(0,(int)ChartGetInteger(1,CHART_WINDOWS_TOTAL),m_BBHand); } void OnTick() { ArraySetAsSeries(m_BBrate,true); ZeroMemory(m_BBup); ZeroMemory(m_BBlow); ZeroMemory(m_BBmidle); ArraySetAsSeries(m_BBup,true); ArraySetAsSeries(m_BBlow,true); ArraySetAsSeries(m_BBmidle,true); if(CopyRates(_Symbol,BB_TimeFrame,0,3,m_BBrate)<0) { return(false); } if(CopyBuffer(m_BBHand,0,1,3,m_BBmidle)<0 || CopyBuffer(m_BBHand,1,1,3,m_BBup)<0 || CopyBuffer(m_BBHand,2,1,3,m_BBlow)<0) { return(false); } } bool buyreg,sellreg=false; //but this code get candle crossing the bands (and it's not that I need) ///I need is only to get the "bands opening" (see the attached graphic) buyreg=m_BBrate[1].close>m_BBlow[1] && m_BBrate[1].open<m_BBlow[1];// White (bull) candle crossed the Lower Band from below to above sellreg=m_BBrate[1].close<m_BBup[1]&& m_BBrate[1].open>m_BBup[1];// Black (bear) candle crossed the Upper Band from above to below }
What would be the exact criteria for "opening"?
Re: Metatrader 5 Versions of indicators.
66hi,
I think that we can mesure the angle of the bb_bands_High and bb_bands_Low.
I will have two signals:
1) BB is opening the mouth (The price is walking, non-lateral market)
if the angle of bb_bands_high is > 45º
and the angle of bb_bands_low > 45º
the bb is opening the mouth...
(see graph)
2) Check is the price is falling or growing up (buy and sell signal)
I think that we can mesure the angle of the bb_bands_High and bb_bands_Low.
I will have two signals:
1) BB is opening the mouth (The price is walking, non-lateral market)
if the angle of bb_bands_high is > 45º
and the angle of bb_bands_low > 45º
the bb is opening the mouth...
(see graph)
2) Check is the price is falling or growing up (buy and sell signal)
Re: Metatrader 5 Versions of indicators.
67baraozemobaraozemo wrote: Wed Apr 26, 2017 6:24 am hi,
I think that we can mesure the angle of the bb_bands_High and bb_bands_Low.
I will have two signals:
1) BB is opening the mouth (The price is walking, non-lateral market)
if the angle of bb_bands_high is > 45º
and the angle of bb_bands_low > 45º
the bb is opening the mouth...
(see graph)
2) Check is the price is falling or growing up (buy and sell signal)
Snap1.png
You can not calculate the angle on a price time series
Some other criteria should be used
Re: Metatrader 5 Versions of indicators.
68(bb is opening)
bb_band_up is growing
bb_band_down is falling
bb is opening for buy
(price touch the bb_band_up)
and (volume is growing)
bb is opening for sell
(price touch the bb_band_down)
and (volume is falling)
the idea is get the breakout for some points
bb_band_up is growing
bb_band_down is falling
bb is opening for buy
(price touch the bb_band_up)
and (volume is growing)
bb is opening for sell
(price touch the bb_band_down)
and (volume is falling)
the idea is get the breakout for some points
Re: Metatrader 5 Versions of indicators.
70mladen, i found this person that is selling a indicator,
I suspect that this one of the indicators created here...lol
I suspect that this one of the indicators created here...lol