Fibonacci retrace backtest for PRT – collaboration project
Forums › ProRealTime English forum › ProOrder support › Fibonacci retrace backtest for PRT – collaboration project
- This topic has 55 replies, 6 voices, and was last updated 6 years ago by
Meta Signals Pro.
-
-
12/22/2016 at 10:41 PM #19015
You can get trial and demo account at PRT-CFD website : https://www.prorealcode.com/PRT-CFD-english/
About Tapatalk, this is something I will consider later. If you have questions about the platform or programming, please open individual topic to let this one dedicated to the Fibonacci retrace project.
01/21/2017 at 11:47 PM #2198903/04/2017 at 7:16 AM #2711703/04/2017 at 9:47 AM #27119Hi Ale
This Project keeps flashing through my mind every few days! Seems its dead in the water at this stage? I keep meaning to check out the code, run it and see how near to working it is. I will do this over the weekend and report back.
It was Maz who was the inspiration and driving force and seem’s ‘he’s not been around these parts’ for a while? I’m sure Nicolas would find the time to help again if another ‘accomplished coder’ was leading the Project.
Cheers
GraHal03/04/2017 at 10:07 AM #27121Hey Great News! … Maz is ‘alive & kicking’ and last committed on the code 10 days ago on GitHub.
I’m getting excited again as this code is close to how I trade manually … Elliott Waves / retracements etc. I’m going to read all the posts in this Thread again over the weekend for a fresh re-start!
GraHal
03/04/2017 at 8:56 PM #2716711/07/2018 at 6:21 PM #84347Hi Grahal,
DId you finally used this script? and of yes with some performances?
Is Maz gone or on an island? 😉
11/07/2018 at 6:35 PM #84348Wow doesn’t time / life fly by!? 🙂
@Kris75 no, I’ve not used the script, if I recall correctly … the code never got to a stage where it was usable. I’m not clever enough at coding to finish it off … might you be??
Last I heard from @Maz (he emailed me 2-3 months ago) he has been very busy in his day job all through 2018, but is hoping to be back on here at some stage / one day!
11/07/2018 at 6:45 PM #84349Hi All,
Just saw the update – yes it has been a while since I had any time to dedicate to this thread / community.
I did complete that PRT indicator and have it archived. If you’d still find it useful and would like to continue then I can dig it out and post it in the indicator library.
Best
M
11/07/2018 at 8:23 PM #84365Yes please @Maz that would be great if you could post the Indicator in the Library.
If (in Library post) you include a link back to this Thread then it might reignite the collaboration towards an Auto-System based around the indicator, improvements, new versions etc?
Many Thanks
GraHal11/07/2018 at 9:57 PM #84368Hi Maz,
What a cool coincidence;-) good to read you;
Am definitely interested in the final script so is Grahal;-)
I downloaded the Github code but it did not work as expected on stocks even after modifications (surely missing smthing);
May I ask you precise questions so we can use your script? Hereunder is the modified script taken from the github project
https://github.com/publicprtcode/Backtests/blob/master/autofib/FibRetrace(long)-boiler-0.01a
- I modified the script in order to adapt it to stocks to be sold at progressive levels of the Fibo grid but the selling process does not wait to reach the next levels (see image1) – which is normal as the former level is still trigering the selling order; but how can we create this level selling process?
- do we need to do smthing with in this part? (line 166)
-
- // Re-evaluate price action and current strategy // …
- I don’t get this part (line 182)
- //if t236 or t382 or t500 or t618 or t764 then
endif
- //if t236 or t382 or t500 or t618 or t764 then
- Did you code the short part?
- Which screeners would you use to maximize this strategy?
Thanks a lot
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183// ============================ \// Fib Retracement system (long)// v 0.01a//// ============================ /// -------------------------- \// Global Settings// -------------------------- /DEFPARAM PRELOADBARS = 1000equity = 1000 + strategyprofitn= round(equity/close)//MaxDrawDownPercentage = 10//MaxDrawdown = Equity * (MaxDrawDownPercentage/100)//////IF OnMarket and ((PositionPrice - low)*CountOfPosition) > MaxDrawDown THEN//Quit//ENDIFonce positionSize = n// ================================= \// Global indicators commplied inline// ================================= /rsi14 = rsi[14] // required by RSI Pop// -------------------------- \// RSI-Pop Inidcator// -------------------------- /once rsipopOS = 0once rsipopOB = 0rsiPop = 0if rsi14 < 30 thenrsipopOS = 1elsif rsi14 > 70 thenrsipopOB = 1endifif rsipopOS and (rsi14 >= 30) thenrsipopOS = 0rsiPop = 1elsif rsipopOB and (rsi14 <= 70) thenrsipopOB = 0rsiPop = -1endif// - END RSI-Pop ----------------------// --------------------------------- \// Auto-Fib (Long) Optimised Indicator// Requires RSI-Pop// --------------------------------- ///fibHigh, fibLow, support, t236, t382, t500, t618, t764, ma20, ma5 = CALL "AutoFib_long"once maPeriod = 34 // to eventually become dynamiconce mDD = 150once fibSet = 0once hH = 0once lL = 0once cS = 99999// requreid by AutoFibma20 = Average[maPeriod](Close)ma5 = Average[5](Close)if not fibSet thenif ma5 crosses over ma20 thenhH = 0cS = 99999cbi = barIndexelseif (close > ma20) thenhH = MAX(hH, High)endifif (ma5 > ma20) and (open < ma5) thencS = MIN(cS, Low)endifif (ma5 < ma20) and (hH > 0) and (low < cS) thenspike = (Close<Open and Close-Low > 14) OR (Open<Close and Open-Low > 14)//rsiPop = CALL "RSI Pop"(close)fibSet = fibSet or rsiPopfibSet = fibSet or (((hH-Low) > mDD) and spike)if fibSet thenlL = Lowest[(barIndex-cbi)](Low)endifendifendifendifif fibSet thenfV = (ma5 > ma20)if fV thenfibSet = 0hH = 0lL = 0cS = 99999//t236 = 0//t382 = 0//t500 = 0//t618 = 0//t764 = 0endiflL = MIN(lL, Low)//fibHigh = hHfbL = lL//support = cS // not needed at the momentif not fV then// Calculate fib levels//hMS = (fibHigh-fbL)hMS = (hH-fbL)t236 = fbL + hMS * 0.236t382 = fbL + hMS * 0.382t500 = fbL + hMS * 0.5t618 = fbL + hMS * 0.618t764 = fbL + hMS * 0.764endifendif //if fibSet// - END Auto-Fib (Long) ----------------------// -------------------------- \// System Defaults (do not touch)// -------------------------- /once currentStrategy = 0// -------------------------- \// Auto-Fib (Long) Optimised// Requires RSI-Pop// Strategy Selection// -------------------------- /if (not onMarket) and fibSet and (close < t236) thenBUY positionSize CONTRACTS AT t236 STOPbuyBarIndex = barIndex + 1currentStrategy = 1endifif longOnMarket then// -- Strategy selections ---if currentStrategy = 1 then// exit rulesif (barIndex-buyBarIndex)>=2 and POSITIONPERF < 0 thenset target pprofit 1endifif (high > t382) thensell round(positionsize/4) contracts at marketendifif (high > t500) thensell round(positionsize/4) contracts at marketendifif (high > t618) thensell round(positionsize/4) contracts at marketendifif (high > t764) thensell at marketendifendif// Re-evaluate price action and current strategy// ...endif// debug -----------//graph hH as "fibHigh"//graph lL//graph t236//graph Close//graph ma20//graph ma5// ------------------if t236 or t382 or t500 or t618 or t764 thenendif -
AuthorPosts