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/01/2016 at 9:21 AM #17645
The indicator framework could be updated and optimized later. Good to know you have a lot of “juice” about this project, I hope you’ll be able to manage it while I’m away from the discussion. Would be glad to have other people on board too ..
About averaging down and up, I believe you already made these kind of codes and that would be with ease to incorporate it into the code with boolean variables to activate it or not… so why not?
If we decide to stop using Fibonacci retracement (which is totally the first and initial concept of this project), it will be another project.. So let’s stick with it!
About price action theory from trade entries, I believe you are talking about piercing last higher high (fractal maybe?), something not very new but difficult to code because of the human conception/feeling about this when you stare at charts.
12/04/2016 at 1:07 PM #17776I am surprised and dissapointed that at least one or two more accomplished coders have not jumped on board this very promising ‘project-ship’ that is sailing into profitable lands! 🙂
More coders would get our ‘juices’ flowing even more … more the merrier / cross fertilisation etc ?
If Nicolas transfered this thread from ‘General Trading Discussion’ to ‘ProOrder Support’ then more coders would see it as there is 5 x more posts on the ProOrder Support Forum (2500) than this Forum (500).
What you reckon, good idea?
12/04/2016 at 2:54 PM #17782Open source projects grow organically and accelerate once a strong consensus is built. That said – Nicolas feel free to extend the invite into your next newsletter or perhaps put out a mailshot to the members; it might spark some more early adopters. December activity usually winds down anyway; I will be taking a break myself soon. Meanwhile I’ll post any significant developments. GraHal – do continue to post any ideas / things to try. Cheers, M
12/05/2016 at 3:00 PM #17817This thread is in the wrong Forum anyway because the discussion is not about ‘General Trading’ (this Forum).
The first post in this thread says …
Please come forward here if you would like to collaborate on a Fibonacci based retracement backtest for PRT”
and so the correct Forum is …
ProOrder support – Related to automated trading coding support (ProBacktest and ProOrder)
I do feel if this thread were moved to the above Forum then it stands more chance to grow organically and spark more early adopters … as you say Maz.
I’m sure Nicolas would move this thread (?), but I guess he needs a request from you Maz (as originator).
Just a few thoughts anyway.
Best Regards
GraHal12/05/2016 at 3:54 PM #1782012/05/2016 at 5:16 PM #1782612/16/2016 at 12:59 PM #18649Hi All,
I would like in on this. I’m a retired I.T. Director who has developed a keen interest in trading. I’ve been coding all my life in various languages, (I’m also used to building Unix/Linux kernels), and I’ve been studying PRT and MT4 recently. I came to the conclusion that Fibonacci is the initial attack mode. I have friends who make money trading but all seem to be glued to screens all day. I’m interested in developing a EA to take the strain.
12/16/2016 at 1:54 PM #1865312/16/2016 at 2:19 PM #18654Here is a small code snippet to take orders with the last version of the indicator (attached to this post):
- buy order is initiated if the Fibonacci 50% level is breach while the Fibonacci grid is still in construction
- pending buy order set at Fibonacci 50% level if the Fibo grid has finished its construction
Stoploss are defined in the code, but I do not set any takeprofit, so trades are never closed 🙂 This is where the smart ideas are welcome: get on market is the easy part, do you know how to exit then?
1234567891011121314151617181920212223242526defparam cumulateorders=false//indifibHigh,fibLow,ignored,ignored,ignored,t500,ignored,ignored=CALL "autofib_long-0.22"//saving the last t500 value to be used by pending ordersif t500=0 and t500[1]<>0 thenbuystoplevel = t500[1]stoploss = t500[1]-fibLow[1]endif//autofib is still under construction//price breach the 50% level, go longif fibHigh>0 and close crosses over t500 thenbuy 1 share at marketstoploss = close-fibLowendif//autofib has finished construction//put pending buy order on 50% levelif fibHigh=0 and not longonmarket thenbuy 1 share at buystoplevel stopendif//putting stoploss on orders of each caseset stop loss stoploss12/17/2016 at 2:47 AM #18695hicksd8 – welcome, feel free to check out the github and contribute with any suggestions be it code or theory.
Please note: As stated in an earlier post, please use the latest boilerplate on github to as a base to build entry/exit rules on top of. Reason being is that:
1CALL "autofib_long-0.22"– this syntax is only ok for illustration purposes (Nico’s code above), it will give false, delayed signals in reality. The results when “calling” the function are not in sync with with the trading system code (in PRT 10.2 at least). You need to “compile” the auto fib indicator code into the trading system so it runs inline, top-down, every loop. The boiler plate does that for you. It’s a PRT qwerk to be aware of.
Link to boilerplate: https://github.com/publicprtcode/Backtests/blob/master/autofib/FibRetrace(long)-boiler-0.01a – to use for actual entry/exit rule back-testing
All the best and happy festivities
Maz
1 user thanked author for this post.
12/22/2016 at 6:38 PM #19006@maz……Thanks for the intro. I’ve spent sometime looking at your code and I’m getting there. PRT is a bit different from C, C++, Basic and Fortran. However, my aim is to understand the logical flow. Unlike the other boards that I subscribe to, this board doesn’t seem to have a PM (Private Message) facility. Could you email me please on xxx as I have a few very stupid questions. I’ll then post all future input here for all to see.
Thanks,
hicksd8
12/22/2016 at 7:32 PM #19008There is no PM on this board, because I prefer to have public discussions around problems or collaborative projects of any kind, like the purpose of this topic.
You are right about the language, it is very specific to the platform, but almost like Basic, you’ll find it easily how to figure some basic and well advanced piece of codes.
The main differences are the lack of functions and arrays.12/22/2016 at 8:59 PM #19010@Nicolas…..Thank you for your reply. I’m finding the language quite slick. There’s a lot you can do with it. I realised early on that functions and arrays weren’t there. What I really had a problem with initially was the use of binary logic variables. Compared to the Basic I’m used to this was confusing.
For example:
c2 = low[1] – high > 0.0002
followed not by:
if c2 =0 then
if c2=1 then
if c2 > 123.4 then
BUT
if c2 then
I contacted PRT to attempt to buy the hardcopy language manual(s) only to told that there aren’t any. You have to print and bind your own and, for various notation, you really need them in colour. That is a lot of pages overall.
I’m particularly interested in studying the FTSE100 Index so I contacted PRT to take up their offer of real-time data trial only to be told that the FTSE 100 Index cannot be included in the trial.
So as a result I loaded up MetaTrader 4 and I get continuous FTSE100 real-time. I want to get some back-testing done before subscribing to PRT and live trading. I have a few friends who are trading the FTSE and doing well but they don’t code. They just watch the screen all day and I’ve no intention of doing that which is why I’m here. I’m making some serious progress now and I’ll keep you posted.
12/22/2016 at 9:00 PM #1901112/22/2016 at 9:18 PM #19012 -
AuthorPosts