Conversion of RSI CCi MT4 into PTC
Forums › ProRealTime English forum › ProBuilder support › Conversion of RSI CCi MT4 into PTC
- This topic has 13 replies, 5 voices, and was last updated 5 years ago by Vonasi.
-
-
01/07/2018 at 9:17 AM #57562
Hi Everyone,
I have a MT4 indicator that involves RSI and CCI.. Pretty advance.. I was wondering if anyone can help to convert it to PTC… I have the MQ4 codes.
01/07/2018 at 10:02 AM #57564Please update your country flag in your profile. Thanks.
These are the guidelines to get free conversions https://www.prorealcode.com/topic/free-conversion-mt4-indicators-mql4/
You should supply a more detailed description and attach the .MQ4 files involved.
Roberto
01/07/2018 at 2:12 PM #57597My bad. Attached is the Mq4 file. This gives the signals to direct up and downwards trend reversal on the difference in RSI and CCI oscillator.
01/08/2018 at 3:44 PM #57757This indicator is repainting itself, are you aware of this behavior? The oscillator is not accurate as the information given in the past could change in the future, so you always get a perfect view of the situation of the past while it was not.
Are you sure you want it to be converted? As it will not look the same at all in ProRealTime.
01/10/2018 at 9:39 AM #58797Yes. I am aware of the repainting. It can be used as a trend filter.
01/10/2018 at 10:35 AM #5880701/11/2018 at 7:20 AM #58953Hi Nicolas,
I am not sure about how you meant by “read only the price series only once” but i appreciate your effort. If you do think there are improvement to it, can update it as well. =)
01/11/2018 at 10:13 AM #58963MT4 version is repainting itself because the data serie is continuously read by a loop at each new tick received, so the code already “know” by advance what the future look like and can change its value according to it. It is a common behavior for metatrader indicator, depends of how it was coded though..
Because PRT only read once the whole price history, “repainting” indicator doesn’t exist, that’s why you’ll get a very different picture between the 2 versions.
01/11/2018 at 10:45 AM #5896701/12/2018 at 1:20 PM #59178Can we take a look at the red line with the crossing.
01/12/2018 at 4:19 PM #59210Sorry, but it leads no where. The calculation made in MQ4 takes values from CCI and RSI from the future by doing loops in the past. I spent a lot of time today trying to reproduce this behavior and results are far from being reliable. This is in the code in its current state (from many other trials I did today): (not to be used in real trading).
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162defparam calculateonlastbars=1000lookback=20CCIper=14RSIper=14MaPeriod=2koef=8//arrows=1 //1 = true , 0 = falseif(koef>8 or koef<0) thenkoef=8endifllimit = lookbacktypical = (high[0] + low[0] + close[0])/3for i = llimit-3 downto 0 do//typical = (high[i] + low[i] + close[i])/3a = cci[CCIper](typical)[i]-rsi[RSIper](typical)[i]b = rsi[RSIper](typical)[i]-cci[CCIper](typical)[i]if(i-1>=0) thena1 = cci[CCIper](typical)[i-1]-rsi[RSIper](typical)[i+1]b1 = rsi[CCIper](typical)[i-1]-cci[RSIper](typical)[i+1]endifif(i-2>=0) thena2 = cci[CCIper](typical)[i-2]-rsi[RSIper](typical)[i+2]b2 = rsi[CCIper](typical)[i-2]-cci[RSIper](typical)[i+2]endifif(i-3>=0) thena3 = cci[CCIper](typical)[i-3]-rsi[RSIper](typical)[i+3]b3 = rsi[CCIper](typical)[i-3]-cci[RSIper](typical)[i+3]endifif(i-4>=0) thena4 = cci[CCIper](typical)[i-4]-rsi[RSIper](typical)[i+4]b4 = rsi[CCIper](typical)[i-4]-cci[RSIper](typical)[i+4]endifif(i-5>=0) thena5 = cci[CCIper](typical)[i-5]-rsi[RSIper](typical)[i+5]b5 = rsi[CCIper](typical)[i-5]-cci[RSIper](typical)[i+5]endifif(i-6>=0) thena6 = cci[CCIper](typical)[i-6]-rsi[RSIper](typical)[i+6]b6 = rsi[CCIper](typical)[i-6]-cci[RSIper](typical)[i+6]endifif(i-7>=0) thena7 = cci[CCIper](typical)[i-7]-rsi[RSIper](typical)[i+7]b7 = rsi[CCIper](typical)[i-7]-cci[RSIper](typical)[i+7]endifif(i-8>=0) thena8 = cci[CCIper](typical)[i-8]-rsi[RSIper](typical)[i+8]b8 = rsi[CCIper](typical)[i-8]-cci[RSIper](typical)[i+8]endifnextif koef=8 thentt1max=a+a1+a2+a3+a4+a5+a6+a7+a8tt2min=b+b1+b2+b3+b4+b5+b6+b7+b8endifbull = average[MaPeriod](tt1max)bear = average[MaPeriod](tt2min)return bull coloured(0,191,255) style(line,2), bear coloured(255,0,0) style(line,2)1 user thanked author for this post.
01/12/2018 at 5:08 PM #59227Thanks Nicolas. Really appreciate the effort in testing this out.
09/04/2019 at 8:39 PM #10653309/04/2019 at 9:03 PM #106536Aziz5 – Welcome to the forums.
These forums are dedicated to ProRealCode and the ProRealTime platform. Conversion to ProRealCode is carried out for free but translation to any other language is not. You can request a paid for conversion by clicking on the link under ‘Help’.
-
AuthorPosts
Find exclusive trading pro-tools on