outdated and BYW i like your face.
Re: SMA Bay Ground! With Shade!
2781- These users thanked the author sal for the post:
- RodrigoRT7
"There is NO GOD higher than TRUTH" - Mahatma Gandhi
outdated and BYW i like your face.
sorry this is my first post on this forum, so please forgive me if I didn't do everything correctly.mntiwana wrote: Wed Mar 29, 2017 6:33 am Angle of averages
Angle of Averages that can calculate angle of one of 20 types of Averages,in picture TMA and Tema
0 : SMA
1 : EMA
Do you have any code samples on how to do this?GerhardMTB wrote: Fri Mar 03, 2023 1:30 am sorry this is my first post on this forum, so please forgive me if I didn't do everything correctly.
In my opinion, an error in the calculation should falsify the result for the Angle of Averages. For the calculation, the value of the MA and the values of the ATR are set in relation. The ATR is also the X axis. Multiplying the ATR by the number of candles corrects the problem somewhat, but the correct factor for calculating the slope would be time, pixel width or something like that. Which reflects the second axis.
No Clean Code and Method. With coef i have to adjust the Angel to the current Zoom Value of the Chart. Did not found a dynamic value for zoom in and zoom Out. But if correct Value is set the Value correspond with the Angel Tool for MT4.
Code: Select all
extern double coef = 15;
int start()
{
int countedBars = IndicatorCounted();
if(countedBars<0) return(-1);
if(countedBars>0) countedBars--;
int limit = MathMin(Bars-countedBars,Bars-1);
for(int i=limit; i>=0; i--)
{
double angle = 0.00;
double price1 = iMA(NULL,0,MaPeriod,0,MaType,MaPrice,i);
double price2 = iMA(NULL,0,MaPeriod,0,MaType,MaPrice,i+AngleBars);
angle = hf(price1,iTime(NULL,0,i+AngleBars),price2,iTime(NULL,0,i));
Buffer1[i] = EMPTY_VALUE;
Buffer2[i] = EMPTY_VALUE;
Buffer3[i] = angle;
Buffer4[i] = angle;
if (angle > AngleLevel) { Buffer1[i] = angle; Buffer3[i] = EMPTY_VALUE;}
if (angle < -AngleLevel) { Buffer2[i] = angle; Buffer3[i] = EMPTY_VALUE;}
}
return(0);
}
double hf (double pr1, int tm1, double pr2, int tm2)
{
if (pr1 == pr2) return (0);
int dg = -1;
dg = (int) MathRound (MathArctan (MathAbs (pr1 - pr2)/Point/(tm1 - tm2)*coef)*180/Pi);
if (pr2 < pr1) dg *= -1;
return (dg);
}
Thank you very much Kvak,kvak wrote: Sat Mar 11, 2023 6:16 am Here is PM request, candles in alligator... Candles is based on "lips" cross close of candle.
Maybe creator of this idea tell us how he is used.....
Dual Channels indicator
MYSTERIOUS CHANNELSkvak wrote: Wed Mar 15, 2023 4:55 pm Dual Channels indicator
Requested file, two channels.....
And extended version
I have an idea. Is it possible to code it such that price above both channels is bullish (any bullish colour) , price below both channels is bearish (any bearish colour) and price between the channels by any means is Grey (any neutral colour)kvak wrote: Wed Mar 15, 2023 4:55 pm Dual Channels indicator
Requested file, two channels.....
And extended version
Users browsing this forum: Bing [Bot], davidpont, Google Images [Bot], Intrest 1, Lwqa, marant, Mescalito, RodrigoRT7, Topguy7, vvFish, Yandex [Bot] and 89 guests