--- In [email protected], "infynhome" <[EMAIL PROTECTED]> wrote:
>
> This formula is giving me a lot of errors.
> Not very good with formulaes.
> Somebody kindly repair this formula
you may try the following:
*******************************************
/* BbandGap. Written by Klaus Hengher based on Tools and Tactics for
the Master Day Trader
Velez, Capra (Pristine)
BbandGap - How to Make Money Shorting Stocks in Up and Down Markets
The Set Up
1) The stock must first puncture and close outside (above) the upper
Bollinger Band.
The closer the closing price is to the high of the day, the better.
And the bigger the day's advance, the better.
As a general rule, you will want this day's bar to be at least $2 or
more in length from
high to low.
This is not always necessary, but it's better to have it.
2) On the following day, the stock must 'gap' down below the prior
day's close.
This 'gap down' is crucial as it serves as the most important criteria
of the entire
strategy.
If the stock does not open for trading below the prior day's close by
at least 50 cents
(preferably more),
no action should be taken. We need weakness right at the open.
Example: If on Tuesday the stock closed at $40, we want to see the
stock open for trading
on Wednesday no higher than $39.50. It must open down!
Note: In many cases, this gap down will be caused by either an
exceptionally weak market
open
or a negative news item on the company, such as a brokerage downgrade.
But in either case, the gap down signifies major selling (profit taking),
and the pros who Short will be loving it.
Keep in mind that both the above criteria must be met before action is
taken.
The Action
Once the above Set Up Criteria is met, the trader will do the following:
1) Sell the stock short (at the market if you have the luxury of being
able to
kill the trade instantly in the event the stock gets too far away from
you).
With order entry systems like The Executioner(r), the trader will be
able to
instantly cancel the open order, if need be. If the trader lacks this
'instant canceling'
capability,
he is better off placing a limit sell order.
2) Once the short has been filled, place a protective stop 1/8 above
the high of the prior
day.
This is our insurance policy against disaster. If the stock rises
above the high of the
prior day,
that is our sign that the shorts are being squeezed, and the major
advance has more steam
left,
as those short will be forced to buy at higher prices to curtail their
losses.
3) Hold for two to three days or more,
protecting your profits on the way down with some form of trailing
stop methodology.
Note: Some traders may want to move their protective stop 1/8 above
each prior day's high.
This is called 'tracking the prior highs.' Others may want to 'book
profits' in the
following manner:
'Once up $1, move stop to break-even. Once up $2, protect 1/2 of the
gain,
and once up $3 or more, protect 2/3 of the gain.
Note: The idea is to ride the short for maximum profits. But of course
if the trader is
shorting a weak stock in the context of a bullish market
environment, booking the profits sooner rather than later is
preferred, even if it means
missing additional gains.
*/
mClose = Ref(C,-1);
mHigh = Ref(H,-1);
mLow = Ref(L,-1);
mAdvDrop = mClose - Ref(C,-2);
mATR = Ref(ATR(8),-1);
diffHl = mHigh-mLow;
mStoch = Ref(StochD(14),-1);
mBBandTop=Ref(BBandTop(C,20,2),-1);
// mopencond=0;
mOpenCond = mClose - 0.5 * mATR;
mOpen = Ref(O,0);
mStopLoss = mHigh + 0.5 * mATR;
// The stock must first puncture and close outside (above) the upper
Bollinger Band.
// The closer the closing price is to the high of the day, the better.
// And the bigger the day's advance, the better.
// On the following day, the stock must 'gap' down below the prior
day's Close.
// This 'gap down' is crucial as it serves as the most important
criteria of the entire
strategy.
// Overbought condition added
/* Exploration Columns for Sorting */
bbTopSell = IIf( mClose > mBBandTop AND mClose > (mLow + 0.75 * diffHL
) AND
mAdvDrop > (1.5 * mATR) AND mOpen < mOpenCond AND mStoch > 80, 1, 0 );
NumColumns = 10;
Column0 = mOpen;
Column1 = mOpenCond;
Column2 = mStopLoss;
Column0Name = "Open";
Column1Name = "OpenCond";
Column2Name = "StopLoss";
Column0Format = 1.2;
Column1Format = 1.2;
Column2Format = 1.2;
Filter = bbTopSell == 1;
Buy = 0;
Sell = bbTopSell>0;
// modified by murthymsr
Please note that this group is for discussion between users only.
To get support from AmiBroker please send an e-mail directly to
SUPPORT {at} amibroker.com
For other support material please check also:
http://www.amibroker.com/support.html
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/amibroker/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/amibroker/join
(Yahoo! ID required)
<*> To change settings via email:
mailto:[EMAIL PROTECTED]
mailto:[EMAIL PROTECTED]
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/