Rex Nfx oscillator mt4
Forums › ProRealTime English forum › ProBuilder support › Rex Nfx oscillator mt4
- This topic has 12 replies, 3 voices, and was last updated 4 years ago by Nicolas.
-
-
02/17/2020 at 4:09 PM #119776rex nfx mt4123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081//+------------------------------------------------------------------+//| Rex.mq4 |//| Copyright © 2014, Gehtsoft USA LLC |//| http://fxcodebase.com |//+------------------------------------------------------------------+#property copyright "Copyright © 2014, Gehtsoft USA LLC"#property link "http://fxcodebase.com"#property indicator_separate_window#property indicator_buffers 3#property indicator_color1 clrGold#property indicator_color2 Redextern int Smoothing_Length=14;extern int Smoothing_Method=0; // 0 - SMA// 1 - EMA// 2 - SMMA// 3 - LWMAextern int Signal_Length=14;extern int Signal_Method=0; // 0 - SMA// 1 - EMA// 2 - SMMA// 3 - LWMAdouble Rex[], Signal[];double TVB[];int init(){IndicatorShortName("Rex oscillator");IndicatorDigits(Digits);SetIndexStyle(0,DRAW_LINE);SetIndexBuffer(0,Rex);SetIndexStyle(1,DRAW_LINE);SetIndexBuffer(1,Signal);SetIndexStyle(2,DRAW_NONE);SetIndexBuffer(2,TVB);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;pos=limit;while(pos>=0){TVB[pos]=(3*Close[pos])+(3*Close[pos+1])+(3*Close[pos+2])-(Low[pos]+Open[pos]+High[pos]+Low[pos+1]+Open[pos+1]+High[pos+1]+Low[pos+2]+Open[pos+2]+High[pos+2]);pos--;}pos=limit;while(pos>=0){Rex[pos]=iMAOnArray(TVB, 0, Smoothing_Length, 0, Smoothing_Method, pos)/Point;pos--;}pos=limit;while(pos>=0){Signal[pos]=iMAOnArray(Rex, 0, Signal_Length, 0, Signal_Method, pos);pos--;}return(0);}02/17/2020 at 5:15 PM #119785
We have to guess that you want this converted? Not even a ‘Please could someone convert this’?
If that is what you want then please follow the instructions that can be found here:
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/17/2020 at 6:15 PM #119790Sorry about that my first time asking for a free code conversion thought that was straightforward please could you convert this for me thank you very much and kind regards now to the matter of the other parts
rex oscillator
rex Oscillator no-nonsense group or RONFXThis is all I have on the indicator sorry I hope it’s enough
Patrick
02/18/2020 at 10:02 AM #119817Rex Oscillator can be found here: Rex Oscillator
02/18/2020 at 9:26 PM #119888Hello Nicholas
I am afraid rex oscillator is not the same as the one that on Prorealtime someone’s changed something in the coding to make it smoother it’s not the settings I’m not sure what it is. If it’s not too much to ask when you have some time to take another look at the coding to see what’s smoothing out one of the lines you can see from the picture that I’ve shared in this post
thank youPatrick
02/19/2020 at 11:09 AM #119933The version you have shared use a different calculation for the TVB (True Value of a Bar), which is not the original one as described by the author.
The TVB is defined as:
TVB = (Close-Low) + (Close – Open) – (High – Close), or
= 3 * Close – (Low + Open + High)
02/19/2020 at 4:41 PM #119963Good afternoon
Are you able to tell me what the calculation is in the mt4 I see it and I’ll post it below but I don’t understand it do you know what is actually doing and if so could you write it in the pro real-time version if that’s ok please thank you
rex nfx tvb12345{TVB[pos]=(3*Close[pos])+(3*Close[pos+1])+(3*Close[pos+2])-(Low[pos]+Open[pos]+High[pos]+Low[pos+1]+Open[pos+1]+High[pos+1]+Low[pos+2]+Open[pos+2]+High[pos+2]);pos--;}I just found this written by the person who’s changed the settings for the Rex oscillator
(( rex is calculated (3*close)/open+high+low. but its too fast, so i coded rex that calculates this for three days, therefore smoothing everything out. it shout hold trends for longer))
02/19/2020 at 6:52 PM #119981Good evening
I tried changing it myself been staring at it for ages and I thought I’ll give it a go but I’ve got no results back it looks the same i’m wondering if it’s to do with (pos=limit;) function in the mt4 what would be the similar thing in Prorealtime
REXNFX123456TVB=3*Close+3*Close+3*Close-(Low+Open+High)-(Low+Open+High)-(Low+Open+High)rexnfx=average[smoothlength,smoothmethod](tvb)/pointsizesignal=average[signallength,signalmethod](rexnfx)return rexnfx coloured(0,255,0),signal coloured(255,0,0)02/20/2020 at 11:50 AM #12002802/20/2020 at 12:51 PM #12003902/20/2020 at 4:22 PM #120086Good afternoon Nicholas
Thank you for doing that now it’s very close to the original don’t know if I’ve missed something or it’s just the data itself but I’m fine with it now but he’s a picture anyway to show you thanks again
Patrick
02/21/2020 at 3:51 AM #120113I think I’ve spotted something else with the code pos=limit; but if(ExtCountedBars>2) limit=Bars–ExtCountedBars–1;
I don’t know if you factor this part in (limit=Bars–ExtCountedBars–1; )
12345678if(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;pos=limit;while(pos>=0)02/21/2020 at 10:05 AM #120130Got a very close similarity with this code:
123456789101112131415161718192021//PRC_Rex Oscillator | indicator//06.01.2020//Nicolas @ www.prorealcode.com//Sharing ProRealTime knowledge//converted from MT4 code// --- settingssmoothlength=14smoothmethod=0signallength=14signalmethod=0// --- end of settings//TVB=3*Close-(Low+Open+High)pos = 0tvb=(3*Close[pos])+(3*Close[pos+1])+(3*Close[pos+2])-(Low[pos]+Open[pos]+High[pos]+Low[pos+1]+Open[pos+1]+High[pos+1]+Low[pos+2]+Open[pos+2]+High[pos+2])rex=average[smoothlength,smoothmethod](tvb)/pointsizesignal=average[signallength,signalmethod](rex)return rex coloured(0,255,0),signal coloured(255,0,0)Differences might come from different data between brokers. Calculation is exactly the same between the 2 codes!
1 user thanked author for this post.
-
-
AuthorPosts
Find exclusive trading pro-tools on