Trading System Boilerplate collaboration
Forums › ProRealTime English forum › ProOrder support › Trading System Boilerplate collaboration
- This topic has 6 replies, 6 voices, and was last updated 7 years ago by Elsborgtrading.
-
-
03/17/2017 at 7:36 PM #28979
Hi all, I hope you are well.
I wanted to see if anyone is interested in joining me on a collaborative effort to develop and then propose a standard specification for a PRT trading system boilerpate (or series of boilerplates). This would work in a similar way to say, a jquery plug-in boilerplate. It is a framework in which entry and exit rules can easily be slotted into, without coding a money management system from scratch each time. I am sure some people have their own templates already. I am hoping to achieve a general template to cover various problems that present themselves.
I see a lot of focus going on entry rules. This is only a small portion of a profitable trading system. I would like to see more focus on position management. A boilerplate should allow you to pull whatever data you need about current and past positions. People naturally write code in completely different ways and that there is no real standard at the moment to writing and submitting code. I have a few basic ideas. I am hoping to gather ideas here and then make a proposal boilerplate.
What basic frameworks does a trading system need?
- Indicator inclusions
- Entry Rules
- Exit Rules
- Risk Management
- Performance management
- Position Sise management
- Time managemen
The boilerplate should include standards for various systems that are used over and over again. For example if you think about exit systems you could either use:
- Trailing Stop
- Time Stop
- Technical scenario Stop
- Risk management stop
- Fixed stop
In addition to modules that can be taken from a boilerplate I would also like to focus on syntax and presentation. For example I would like to suggest a code specification such as:
- camelCase
- a = b + c (not a=b+c)
- fullVariableNames (not xyz)
- // Comments throughout with standard for comments such as
// == Section heading == //
// |———-end———–| // - Version Control: v0.1 alpha
Open to discussion – please feel free to drop ideas, debates, proposals for code snipps and such like. I hope to achieve some standardization with boilerplate version control.
All the best,
Maz
03/20/2017 at 8:26 AM #29111I can help. Can I suggest to make function activated or not with boolean settings at the beginning of the code? example:
12345// --- SETTINGSUseTrailing = 0 //(0=false / 1=true)UseMoneyManagement = 1 //(0=false / 1=true)// .... etc.// --- END OF SETTINGSFYI, PRT is currently working on a large update about the main engine. I heard that CALL will be thousands times faster than now, so when it will be available to everyone we could start to build function called with CALL instead of put them all in each of our code.
1 user thanked author for this post.
03/20/2017 at 1:54 PM #29171Don’t mind getting involved. I have my own template which includes a lot of the things in your list, can’t see anything obvious missing. Might be covered under time management but depending which market the template is for Daylight Saving Time settings might be needed and also market closed days for equities.
Regarding the Boolean settings Nicholas referred to, when I started out the system seemed to offer pre-defined constants for True and False but they can only be used with certain system functions e.g.
DEFPARAM CumulateOrders = False
I didn’t like the idea of using 0 and 1 as these could be confused with actual values tested in the code so I came up with these pre-defined pseudo-constants which I use in all my strategies:
ONCE VALUETRUE = (1>0)
ONCE VALUEFALSE = (0>1)e.g.
ONCE ShortOnly = VALUEFALSE
ONCE LongOnly = VALUETRUESo then I can test later with e.g.If LongOnly and ‘something’ then…Just my own way of doing things, won’t be to everyone’s taste but I thought it worth a mention03/29/2017 at 11:26 AM #30203Maz, I hope this comes to fruition, it will give us much needed structure and rigour in our Systems Development.
Somehow though I think maybe your first post is so well thought out and all consuming it has scared folks off from making more elementary suggestions? Anyway here goes …
A simple idea popped into my head and in order to make it simple for others to add ideas (that pop in their heads! :)) it be good if – in your first post – the bullets are numbered and then we can just say # 10 blah blah etc.
#16 Comments: Applicable Timeframe, Timezone and Market needed as part of section heading.
GraHal
04/11/2017 at 1:08 PM #31717Hello Maz,
I’m interested in your idea for this collaboration project.
I too see much focus on indicators and entry/exit rules. I also see that the focus is immediately from the start of idea’s on entry/exit rules, before clear design of the idea. Your topic is the first topic that I read in which the design is mentioned clearly and I too believe that is where developing a system should start.
No offense to all the library-posts and topics on this site and the good work that is done with setting up the prorealcode site, but the competition cannot be beaten with partial idea’s which do not come together as a whole.
I was thinking myself of gathering a developement-team for a more professional approach. The phases of this approach are should include:
- idea
- global design
- detailed design
- programming and developing
- improvement
and maybe more.
This should be an iterative process for every element that you mentioned in your topic.
In an earlier topic of you, you mentioned to communicate with a github. I think too that is a good idea for organizing the developement. Saw you worked already that way in the topic about Fibonacci ?
Looking forward contact you.
Regards John
05/04/2017 at 10:15 AM #34502Oh this topic, I’d really like to push camelCase recommendation for coding
Notwithstanding a great community here; seeing library and forum code written in all caps or suchlike styles makes it a laborious task to decipher!
Those for camelCase say Aye 🙂
05/04/2017 at 11:20 AM #34508Great Idea Maz.
My two cents would be:
because we cannot partially close positions, we could simply builds the template twice. One that has a realistic takeprofit, more or less 20 pips, and one that has the the breakeven at the same pips, but continue with a trailing sl code. A T1 and T2 exit system
Cheers Kasper
-
AuthorPosts
Find exclusive trading pro-tools on