Absolute Strength oscillator mt4
Forums › ProRealTime English forum › ProBuilder support › Absolute Strength oscillator mt4
- This topic has 8 replies, 3 voices, and was last updated 4 years ago by Nicolas.
-
-
02/17/2020 at 4:15 PM #119777
Hello could you convert this ASO (absolute Strength oscillator) mt4 to prorealtime it’s similar to Ash indicator but it’s not the same
ASO123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108#property indicator_separate_window#property indicator_buffers 6#property indicator_color1 Green#property indicator_color2 Redextern string ModeStr="Mode: 0 - RSI, 1 - Stoch";extern int Mode=0; // 0 - RSI, 1 - Stochextern int Length=9;extern int Smooth_Length=2;extern int Price=0; // Applied price// 0 - Close// 1 - Open// 2 - High// 3 - Low// 4 - Median// 5 - Typical// 6 - Weightedextern int Method=0; // 0 - SMA// 1 - EMA// 2 - SMMA// 3 - LWMAdouble BullsOut[], BearsOut[];double Bulls[], Bears[], AvgBulls[], AvgBears[];int init(){IndicatorShortName("Absolute Strength oscillator");IndicatorDigits(Digits);SetIndexStyle(0,DRAW_LINE);SetIndexBuffer(0,BullsOut);SetIndexStyle(1,DRAW_LINE);SetIndexBuffer(1,BearsOut);SetIndexStyle(2,DRAW_NONE);SetIndexBuffer(2,Bulls);SetIndexStyle(3,DRAW_NONE);SetIndexBuffer(3,Bears);SetIndexStyle(4,DRAW_NONE);SetIndexBuffer(4,AvgBulls);SetIndexStyle(5,DRAW_NONE);SetIndexBuffer(5,AvgBears);return(0);}int deinit(){return(0);}int start(){if(Bars<=3) return(0);int ExtCountedBars=IndicatorCounted();if (ExtCountedBars<0) return(-1);int limit=Bars-2;if(ExtCountedBars>2) limit=Bars-ExtCountedBars-1;int pos;double Pr0, Pr1;double smax, smin;pos=limit;while(pos>=0){Pr0=iMA(NULL, 0, 1, 0, MODE_SMA, Price, pos);Pr1=iMA(NULL, 0, 1, 0, MODE_SMA, Price, pos+1);if (Mode==0){Bulls[pos]=0.5*MathAbs(Pr0-Pr1)+Pr0-Pr1;Bears[pos]=0.5*MathAbs(Pr0-Pr1)-Pr0+Pr1;}else{smax=High[iHighest(NULL, 0, MODE_HIGH, Length, pos)];smin=Low[iLowest(NULL, 0, MODE_LOW, Length, pos)];Bulls[pos]=Pr0-smin;Bears[pos]=smax-Pr0;}pos--;}pos=limit;while(pos>=0){AvgBulls[pos]=iMAOnArray(Bulls, 0, Length, 0, Method, pos);AvgBears[pos]=iMAOnArray(Bears, 0, Length, 0, Method, pos);pos--;}double SmoothBulls, SmoothBears;pos=limit;while(pos>=0){SmoothBulls=iMAOnArray(AvgBulls, 0, Smooth_Length, 0, Method, pos);SmoothBears=iMAOnArray(AvgBears, 0, Smooth_Length, 0, Method, pos);BullsOut[pos]=SmoothBulls/Point;BearsOut[pos]=SmoothBears/Point;pos--;}return(0);}02/17/2020 at 5:18 PM #119786As per your other request follow the instructions found here when requesting a free conversion:
https://www.prorealcode.com/free-code-conversion/
The person doing the conversion needs far more than just the code to assist them. Please add the missing information to this post rather than submitting it again via the form.How to formulate the request?-
- Write a meaningful title, containing the name of the original code and its platform
e.g. “Conversion of indicator X from the Y trading software”
-
- Add a complete description and any useful information about the original code
- Add the original code in your description or as an attachment
- Add attachments files: screenshots, documents, code files, ..
(if the original code is an indicator, screenshots are greatly appreciated!)
02/18/2020 at 2:45 AM #119807Absolute Strength oscillator mt4 Hello could you convert this ASO (absolute Strength oscillator) mt4 to prorealtime it’s similar to absolute Strength indicator but it’s not the same I don’t have any more information than this hope there’s enough the indicator is also called ash but it’s filename is absolute strength oscillator thank you
02/18/2020 at 10:14 AM #119818Absolute Strength indicator can be found here: Absolute Strength
It’s always a good idea, before asking code conversion, to make a search on the website/library! 😉
02/18/2020 at 2:27 PM #119838I believe the equations are slightly different but it’s ok ok it’s not that much of a big deal thank you anyway
Patrick
02/18/2020 at 2:45 PM #119841In what way are the calculations different? I’m no MT4 expert but there are not many calculations in that indicator and they all look the same to me. Are you sure that it isn’t because you have the settings different? Different average type or different smoothing length perhaps?
02/18/2020 at 8:30 PM #119884Hello Vonasi
Thank you for looking just to let you know no I have played around with all the settings because the modes might not actually be in the same order that’s fine, it’s just a difference between the two indicate on the mt4 platform and the one in the picture that called absolute strength oscillator on the left is really smooth it’s settings are basically the same as the indicator below which is called absolute strength histogram. It can get a bit confusing, I’ll try and get as close as I can with the pro real time absolute strength indicator but thank you anyway
Patrick
02/18/2020 at 9:15 PM #119887Also bear in mind that the data you are applying the indicator to is not going to be the same.
For example if you are using PRT with IG then they include Sunday candles where your MT4 data might not. If you don’t feed the same data in then you won’t get the same result out.
1 user thanked author for this post.
02/19/2020 at 11:18 AM #119934 -
-
AuthorPosts
Find exclusive trading pro-tools on