Request - Tutorial doc for modifying a template

A forum for all EdgeRater users

Moderator: Chris White

Post Reply
canucck
Posts: 19
Joined: Sun Dec 18, 2011 9:00 am

Request - Tutorial doc for modifying a template

Post by canucck »

Hi Chris,

A request follows, but let me first explain what I was hoping to achieve ... Earlier this week, I looked through the HGSI templates to see if there were any templates which showed me if any Kahunas had recently fired in my lists, and since I could not find one, I decided to see if I could modify a template - I copied the Morales & Kacher template, but the George Lea one would have been a good one too.

The first thing I noticed was that I need to create a scan, so I copied and modified the KahunaForceUp scan to remove the Force Index lines, and then successfully compiled it. I then copied the BARSSINCE script to create one for checking how many days since the scan was true - this also successfully compiled. I modified the template headings to reference the scan and days since indicator (I did not add "MY" in front of their names). If this would have worked, I would have a very simple template to show me that a Kahuna had fired, and how long ago. Unfortunately, it did not, but as you can see, this is probably a simple request. Had that worked, I would have then added in KahunaForceUp and Days since for that event.

In attempting to debug this template, I reviewed your previous posting on creating a template, but was not sure how to apply it to this scenario. I also noticed that the scan that I created, may not be recognized as a scan as it is stored in the My Scripts area, and not the scan area.

THE REQUEST - Selfishly, I'd like guidance on how to create my template, but I think that this requests highlights an opportunity to create an instructional document or tutorial to show how some of the existing scans and indicators ( or user defined ones) could be used to get additional value, and it would perhaps lead to other users posting and sharing templates in the user forum.
canucck
Posts: 19
Joined: Sun Dec 18, 2011 9:00 am

Re: Request - Tutorial doc for modifying a template

Post by canucck »

Does anyone have anything that they can share to help with this request? Thanks.
nlenz
Posts: 2
Joined: Fri Dec 06, 2013 11:34 am

Re: Request - Tutorial doc for modifying a template

Post by nlenz »

Images of the template file's tabs
Images of the template file's tabs
Hi,

About your questions, here are 2 points that may help, because I've been in a similar position before I found out. How to exit after N bars from the entry (in my case on 6th bar). Only note that it will show after the market close due to the bars being counted from the entry's close. A way around this is to change it to N-1 (e.g. 5 for this example) so that it would show up from before the open:
setup:= FML('My.CRSILTX(X)');
entry: setup == 1;
exit: REF(setup,6) == 1;
hold: SEQUENCE(entry, exit);

The script above shows the entry whenever the CRSI<X and the exit on the 6th bar, which is the equivalent of the Trade Exit Rule: Fixed Hold Period 7 in the simulation tab of EdgeRater. (because the software counts the entry signal day as day #1 rather then the next day being day #1).
While the trade is being held it is defined as a hold.
Note that in this case although the CRSILTX(X) is a standard script, I happened to have saved a copy of it under the "My Scripts" group as well. It even shows the same name as the original on the side bar of the scripts (i.e. CRSILTX(ConnorsRSI<X) ) - but in the script that I wrote at the beginning, you can see that it calls the function through CRSILTX(X) where X is defined in the parameter list of this script and is passed to the CRSILTX function's own X parameter.
Also, attached here are 4 images from the excel file's tabs with all the rules for entry at CRSI<3 plus the above rules. (X=3). There is also another rule for this particular system for a fixed take profit, but it isn't coded because you apply it yourself through your broker.
p.s. There some unused columns. And you may have to scroll to the bottom of the generated list of trades (after running the screen) to see the exits and holds (the entries are at the top, though). Plus, be sure to save the excel file while the "Formatted System" tab is the current active tab, because there the actual highlighted signals will show, and saving it that way will directly bring you to that tab in EdgeRater.
Images of the template file's tabs
Images of the template file's tabs
2.jpg
3.jpg
4.jpg
canucck
Posts: 19
Joined: Sun Dec 18, 2011 9:00 am

Re: Request - Tutorial doc for modifying a template

Post by canucck »

Hi,

Thank you for sharing this - I really appreciate it.

I will work through this in the next week or so, and I hope it is applicable to the template I am trying to work through.

If I can get through this, I'll post the template and any tips that I can offer.
nlenz
Posts: 2
Joined: Fri Dec 06, 2013 11:34 am

Re: Request - Tutorial doc for modifying a template

Post by nlenz »

You are welcome.
Thank you, too.
Post Reply