Search the web
Sign In
New User? Sign Up
amibroker-ts · AmiBroker Trading Systems
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Message search is now enhanced, find messages faster. Take it for a spin.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
20/20 bars   Message List  
Reply | Forward Message #3509 of 3520 |
Here is some preliminary code I'm using to identify 20/20 wide range
bars. Apply the indicator as an overlay to label bars, run the
exploration for one day a couple days ago to generate some charts to
evaluate what happens after a 20/20 bar occurs. Velez claims 3
varieties of reversals, two varieties of continuations and, of
course, some failures.

If the visuals look promising I'll move on to coding the first
reversal pattern.
Sid


/* Amibroker Coding by Sid Kaiser
V0.5, 27 Dec 07

From the Guerrilla Trading Tactics DVD, available on eBay for $10-$15.
20/20 bar as defined by Pristine Trading / Oliver Velez.
A long green bar with the open in the lower 20% of the bar and the
close in the upper 20% of the bar.
OR
A long red bar with the open in the upper 20% of the bar and the
close in the lower 20% of the bar.

When applied to NASDAQ stocks > $20 or NYSE stocks > $40 a long bar
is > $1.50 H/L range.
Plot red and green candlesticks, apply indicator as overlay.
*/

tprange = 0.2*(High - Low); // 20% of the range

Longbar = IIf(tprange/Close > 0.01, 1, 0); // Pick the big range
bars by %, rather than fixed $

TTGbar = IIf(Open - Low <= tprange AND High - Close <= tprange AND
Longbar, 1, 0); // 20/20 green bar
TTRbar = IIf(Close - Low <= tprange AND High - Open <= tprange AND
Longbar, 1, 0); // 20/20 red bar

/***** Exploration *****/

Filter = (TTGbar OR TTRbar) AND (MarketID(1) == "NYSE" AND Close >= 40
OR MarketID(1) == "Nasdaq" AND Close >= 20);

AddColumn(Close, "close");
AddColumn(TTGbar, "TTGbar");
AddColumn(TTRbar, "TTRbar");


/***** Indicator *****/ //use as overlay
for( i = 0; i < BarCount; i++ )
{
if( TTGbar[i] ) PlotText("TTG", i, H[i] + tprange[i], colorDarkGreen);

if( TTRbar[i] ) PlotText("TTR", i, L[i] - tprange[i], colorDarkRed);
}

//Gbar = IIf(Close > Open, 1, 0);
//Rbar = IIf(Open > Close, 1, 0);
//range = High - Low

[Non-text portions of this message have been removed]




Sat Dec 29, 2007 5:33 pm

skbiker
Offline Offline
Send Email Send Email

Forward
Message #3509 of 3520 |
Expand Messages Author Sort by Date

Here is some preliminary code I'm using to identify 20/20 wide range bars. Apply the indicator as an overlay to label bars, run the exploration for one day a...
Sidney Kaiser
skbiker
Offline Send Email
Dec 29, 2007
5:33 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help