Search | User Listing Vidsite | Calendars | Quotes
Home Page ->  OLang, OScript & OPilot -> Entries using Filter Blocks -> View ThreadLogon (or Register, or Join TradeTight)

You are logged in as a limited-access Guest.To join TradeTight, first read the info in the Organization & Content room, then click the link above. 

1 Timothy 6:6-8 (ESV) … Now there is great gain in godliness with contentment,  for we brought nothing into the world, and we cannot take anything out of the world.  But if we have food and clothing, with these we will be content.


Sticky Strategy-Structure for Filter-Entry uses
Jump to page : 1
Now viewing page 1 [50 msgs/pg]
Jump to room :
JimDean
Posted 9/10/2012 5:59 PM (#3973)
Subject: Strategy-Structure for Filter-Entry uses



Owner/Admin

Posts: 3796
20001000500100100252525
Location:
USA: GA, Lawrenceville
I'm providing a VERY simple strategy here to illustrate the "architecture" of how a Non-OT-Pro user can create custom Entries using OmniScript (not OLang) via the Filter Block. The example allows for either Long or Short signals to be active in the strategy, by using a "child" process line for the alternate direction.

It has two process lines, feeding a common Vote Block, which then feeds an Orders Block (which could just as well be a Trade Plan Block or a Fulcrum Block).

The System Blocks are, on their respective process-lines, AllBarsShort and AllBarsLong ... these are the "secret ingredient" that makes this all work. Each of them create a CONTINUOUS STREAM of Entry signals ... EVERY bar has a Long/Short signal from the respective systems. So, each bar is "potentially" an Entry bar in either direction. But most of these are thrown away by what follows ...

The Filter Blocks do all the heavy lifting for Entries. One Filter is set up to process the Long entry logic, and the other for the Short entry logic. This simple example uses similar but independently-adaptable logic for the two. The rule is, a Long entry can occur once the 5-bar EMA has been ABOVE the 15-bar EMA for at least 5 bars in a row. A Short entry can occur once the 4-bar EMA has been BELOW the 12-bar EMA for at least 4 bars in a row.

The reason the EMA periods are "faster" for the Short entries is that generally that's how the market moves. But I just slammed in some numbers ... nothing magic here.

OT has a "quirk" in it at this time ... for some reason it requires a Performance Block to be inserted between the Filter and the Vote Block in order to make this work. Note that the Performance block has all ranking and filtering turned OFF ... it does nothing other than pass thru the signal. (see next post for an alternative layout)

The Long and Short Filters are USUALLY mutually-exclusive rules ... so it will rarely be the case that a long signal is passed by its filter on the same bar that a short signal passes its filter.

If both get through, the Vote block will use the Long signal since it's in the primary (top) thread. You COULD turn on the Performance blocks to create ranking "biases" that would make the Vote decision more robust ... but this example does not utilize that option.

So, the Vote block really doesn't have to do anything ... just grabs whatever signal makes it, and passes it on. AND, there will be some bars (during tight consolidations) that don't have any signal at all since the EMA's may be whipsaw-ing back and forth.

Note that it's possible for a trade to end in one direction and immediately re-enter in the opposite direction ... but due to the 4/5-bar "lookback" EMA-stacking rule, there is usually a gap between trades.

And, in order to illustrate how a "normal" Filter might be used with this ... I've added one after the Vote Block, that senses whether the Trend is Bull, Bear or uncertain, based on the stacking of two EMA's (40 and 80), plus the slope of the 40 EMA. This throws out some trades that would have been against the market ... but it also delays the entries somewhat as a new trend is starting.

The Exits in the Orders Block are: a tight Fixed Loss (2 ATR) and Trailing Profit (1 ATR with no Threshold) Stops, plus a Moving-Average-Crossover stop set to the slower of the two EMA's used in the Filter-based Entry. The combo of these three takes you out of trades before they can go against you very much.

Please don't take this to be a particularly "good" Strategy ... it works OK but certainly doesn't have impressive stat's in the Analysis. The purpose of this posting is to show the barebones structure needed to create custom-entry Strategies without access to OLang via OT Pro.

The Strategy OTS file is attached, as well as the snaps. To install an OTS file, when you download it put it directly into the OT2012\Strategies folder, while OT is turned off. Then start OT and it should be on your strategy list. This OTS file is self-contained ... you don't need any other files to use it ... but you do need a fairly recent release of OT2012.

As an added bonus, for each of the three Filters and also the three Stops in the Orders Block, I've set up Parameter-variables in the formulae so that if you want, you can turn on Dynamic Optimization for any or all of those blocks, to find the "walk-forward sweet spots". Or, you can use Strategy Wizard to study what the D.O. min/max/inc/def values really "ought to" be ... but both of those processes are LONG stories that I address in Video Training.

(Strategy for Filter-Entry (PerfBlock) - chartsnap.png)



(Strategy for Filter-Entry - 3 Filter Blocks.png)



(Strategy for Filter-Entry - 3 Exit Stops.png)



Attachments
Attachments Strategy for Filter-Entry (PerfBlock) - chartsnap.png (66KB - 9 downloads)
Attachments Strategy for Filter-Entry - 3 Filter Blocks.png (89KB - 12 downloads)
Attachments Strategy for Filter-Entry - 3 Exit Stops.png (109KB - 11 downloads)
Attachments aJDgyAllLSviaFilterPerf.ots (1460KB - 25 downloads)
Top of the page Bottom of the page
JimDean
Posted 9/11/2012 11:47 AM (#3974 - in reply to #3973)
Subject: Strategy-Structure for Filter-Entry uses



Owner/Admin

Posts: 3796
20001000500100100252525
Location:
USA: GA, Lawrenceville
There is another variant on this strategy that does basically the same thing in a different way. I'm not sure whether both of these arrangements will continue to be supported by OT ... probably so.

This alternative uses THREE VOTE BLOCKS instead of two, but WITHOUT PERFORMANCE BLOCKS.

In theory the two run identically, as long as the Perf Block functions are turned off - the Analysis stat's support this. I ran a test on the SP-500 for 400 bars BT & 400 FT, and it appears that the calc time is effectively the same for the two.

So ... use whichever you wish ... BUT ... if you want to be able to use the "power" of Perf Ranking, use the one presented previously.

I've changed the chart template for this one so you can see the Stops in action (removed the MA's).

Also note the Vote Line is structured differently in this one ... Strategy is attached.

(Strategy for Filter-Entry (3 VoteBs) - chartsnap.png)



Attachments
Attachments Strategy for Filter-Entry (3 VoteBs) - chartsnap.png (37KB - 7 downloads)
Attachments aJDgyAllLSviaFilters.ots (1460KB - 18 downloads)
Top of the page Bottom of the page
JimDean
Posted 9/11/2012 12:57 PM (#3978 - in reply to #3974)
Subject: Strategy-Structure for Filter-Entry uses



Owner/Admin

Posts: 3796
20001000500100100252525
Location:
USA: GA, Lawrenceville
I just discovered one fluke in the ability of the Performance Block to "do its thing", if it's turned on ... ie using a variant of the Strategy posted at the top of this thread.

The Performance Block "RANKING" feature DOES impact the results ... but you won't see it unless you modify the Filter rules so that it's possible for the Long and Short signals to fire on the same bar (as mentioned earlier, the initial set of rules did not typically create that condition.)

So, I created a variant of the Strategy (MnMx) where I "pushed" the Short filter Parameters to the "fastest" end of the range, and I pushed the Long filter Parameters to the "slowest" end of their range. Also, to make sure that the voting process had something to work with, I changed all the N-bar values from 1 bar to 5 bars.

THEN, I created two variants on that MnMx system, one where I activated the APR Ranking in the Performance Block and told the Vote Block to decide on the signal based on Rank (which should have flipped some trades Long <> Short) ... and the other where I changed the Performance Block Filter rules to require 100% Hit Rate and 100% APR (which should have killed virtually all the trades).

I ran those three Strat's on the SP100, 400b BT and 400b FT. I've attached the three Strat's, and a PDF of the Analysis Report. Note that the Perf Block RANKING change DID make a difference in the results, but the Perf Block HR/APR Filtering DID NOT make a difference. I don't know why ... I've asked Barry to check but I'd suspect this would be low priority. So, for now, think of the Perf Block option as being useful for Ranking enhancements.

The three Strat's are attached, with the Analysis PDF, and the snaps show the Filter Rule changes (also, change the Sys Block Nbar from 1 to 5, just in case)


(Strategy for Filter-Entry (PerfBlock) - variations.png)



Attachments
Attachments aJDgyAllLSfiltMnMx.ots (1460KB - 18 downloads)
Attachments aJDgyAllLSfiltMnMxHrApr.ots (1460KB - 17 downloads)
Attachments aJDgyAllLSfiltMnMxRank.ots (1460KB - 18 downloads)
Attachments FilterPerf, PerfRules comparison, SP100 400b+400b.pdf (33KB - 24 downloads)
Attachments Strategy for Filter-Entry (PerfBlock) - variations.png (119KB - 9 downloads)
Top of the page Bottom of the page
ThomasHelget
Posted 9/12/2012 11:30 AM (#3979 - in reply to #3973)
Subject: Strategy-Structure for Filter-Entry uses



Elite

Posts: 462
1001001001002525
Location:
USA: NY, Baldwinsville
Jim:

Thanks, I have been trying to perform something like this since the availabily of AllBarsLong and AllBarsShort but had been unable to come up with a working hypothesis.
Top of the page Bottom of the page
Jump to page : 1
Now viewing page 1 [50 msgs/pg]
( E-mail a Link | Printer Version | Search Room )

Owner of site: Jim Dean -- Forum content is confidential, and may not be distributed without written permission.