Mar 22, 2014 | Uncategorized
As I write the stock market is headed higher. As a trend-follower by nature (sorry it’s just my nature) I try to avoid sitting around and stewing in “The End is Near” type of thinking. For the record there is a lesson in that. Stop for a moment and think about all of the predictions of “the top” you have heard or read in roughly the last 17 months or so as the market has moved relentlessly higher (Thank you Fed – for now).
Those predictions all fall into one of three categories – Wrong, wrong or wrong.
Still, the phrase that “all good things got to come to an end” remains essentially a universal truth. My hope is that the major averages (and the majority of stocks) will break through to the upside and take out their recent highs and continue to power higher. But if this rally fails…………it might make sense to be prepared. Please note that I am not intending to imply that if the market fails to make new highs that Armageddon will ensue. But the market does appear to be losing some momentum (more on this topic in a moment). And once the “worm turns”, well, corrections tend to happen pretty quickly and at times pretty ferociously.
So my best advice at the moment is “enjoy the ride, but please take a moment to locate the nearest exit.”
Is The Market Losing Momentum?
Figure 1 displays the S&P 500 daily bar chart at the top with the 3-day RSI and the MACD (18/37/9) indicator at the bottom.

Figure 1 – RSI and MACD creating bearish divergence from SPX (Courtesy: AIQ TradingExpert)
Note that during the second half of 2013 as the S&P 500 moved higher both of the indicators confirmed the move. Since the first of this year both indicators have been forming a bearish divergence – i.e., price moves to a new high while the indicators do not. Now once again it should be noted that simple divergences happen from time to time and do not imply the end of the world as we know it. But they do flash a warning sign that alert traders should pay attention.
So there are two scenarios to watch for:
1) The S&P 500 index and other major average move to new highs and the indicators “stop diverging” and once again “start confirming” (This is “Good”).
2) The S&P 500 and other major average fail to make a new high or briefly reach new high ground and then reverse, while the indicators continue to signal weakness (This is “Bad”).
My advice is to pay close attention in the days and week ahead.
One Way to Play
This idea is merely “food for thought” and a little too soon to act upon in my opinion (i.e., the time to consider acting is if and when the market fails to follow through to a new high and the indicators remain weak). But if you want to consider a “cheap hedge” here is an example that uses the “Garbage Trade” I’ve written about (that I learned from Gustavo Guzman) of late.
The example trade displayed in Figure 2 involves:
Buying 1 June SPY 178 put option
Selling 2 June SPY 169 put options
Buying 1 June SPY 160 put options
At present prices this trade costs $67 to enter. If SPY got back down to about 181 this trade would generate an open profit in the range of 100%. If things actually did “fall apart” (again, not “predicting” just “preparing”) this trade would generate a profit of several hundred percent.
Again, not really a trade to make right now, but rather an idea to keep in the back of your mind, you know, just in case…..
Jay Kaeppel Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.
Mar 12, 2014 | Uncategorized
So you see what I was talking about, right? Under the category of “I hate it when I’m right”, last week I wrote “when I write an article about a trend that has been playing out time and time again over a several year period – that can pretty much be counted on to put an end to that trend”, referring to the fact that ticker VXX has been in a prolonged downtrend for a number of years.
Within minutes (or so it seems) the Russian Army is on the move. Coincidence? OK, probably so, but geez, maybe I should try picking tops and bottoms…
Anyway, in light of the newfound fear and loathing that popped back up over the weekend, it is time to review a useful strategy for traders concerned about the downside in the near term.
The Garbage Trade
Several years ago I learned a simple hedging strategy from Gustavo Guzman, a former colleague of mine. He dubbed it the “Garbage Trade”. But don’t be fooled by the name, for it is anything but.
Essentially a hedging strategy, the basic idea of this simple option strategy is to risk a little bit of capital on something that most people don’t think is going to happen. If it doesn’t happen, OK, you lose a little. But if it does happen, you make a whole lot.
One word of warning: for the “average” investor – one whose basic approach to investing is one of “buy a stock or mutual fund or ETF and hope it goes up” – this type of trading is quite a foreign concept. Of course, given the world we live in today, considering alternative ideas to investing and trading might be a good thing.
The Starting Point
The basic idea Guzman taught was that after a market (especially the stock market) had experienced a good run up, a pullback of some sort was invariably due. So his suggestion was after a run up, buy a put option roughly 5% out of the money. Then go down the strike prices until you find a put option that you can sell two of which will pay for the first put option you bought (example to follow). Then if you had gone down say three strike prices from the option you bought to the option you sold, then go down three more strike prices and buy one put at that price.
Right now all of the “non option junkies” have their fingers poised over the arrow to go back to the Main Web Page. But wait!! Please at least consider the example below.
Figure 1 – Ticker IWM tracking the Russell 2000 Index (Courtesy: AIQ TradingExpert)
In Figure 1 we see a bar chart for ticker IWM, an ETF that tracks the Russell 2000. Now let’s assume that a trader is concerned about the potential for a pullback – let’s say based on current geopolitical goings on – but not necessarily outright bearish. In other words, he doesn’t want to “Sell Everything!”, but would like some protection if things go south for a while.
In Figure 1 we can see that if IWM starts to decline there are several natural “price targets” where a trader might consider taking a profit. But I am getting ahead of myself.
Using Guzman’s outline for the Garbage Trade, one possibility is as follows:
-IWM shares are trading on 3/4/2014 at 120.32.
-If we multiply this by 0.95 we get 114.30
-We can choose either the 114 or the 115 strike price put. Due to higher volume I will select the May 115 put.
-In order to take in enough premium to pay for the 1115 put we would sell 2 May 109 puts for 1.13 each (or $113 x 2 = $226 premium taken in)
-We then go own six more point and buy one May 103 put for 0.60, or $61.
All told, it costs all of $55 to buy a 1 by 2 by 1 position. The risk curves for a 10-lot position costing $550 appears in Figures 2 and 3.
So basically, one of a couple things will happen. In a nutshell, either IWM will suffer a pullback and this position will offer the potential to make a fairly high return on capital, or the trader stands to lose a maximum of $560.
A couple of things to note:
*If IWM moves to new highs the trader can either:
a. Exit the trade and cut his loss
b. Continue to hold the position – at least for a while – just in case something bad happens later rather than sooner
*If IWM does start to decline then the trader should have a profit target in mind and should pay attention to the price level at which the risk curve for the latest date will “peak” and start to “roll back down.” Figure 1 displays several potentially useful “price target levels” where a trader might consider taking a full or partial profit.
Summary
As always, this example is not presented as a “recommendation”. It is simply an example of one way to get a little exposure to the downside if you start to feel some “concern.”
The vast majority of traders who look to options focus on buying calls and puts in hopes of maximizing a specific market timing method, and/or selling covered calls against stocks they hold. Nothing wrong with these ideas, but the real power of options is that they afford you the opportunity to “attempt” things you normally could not or would not do using stocks, ETFs or futures.
The Garbage Trade is an example of one way to use options to risk small amounts of capital with the potential for significant percentage gains.
As always this example is not a “recommendation”, only an example. Note that it would seem like an illogical time to put on a trade like this. The stock market has bounced back from the Russia/Ukraine crisis in one day and the current trend clearly remains to the upside.
For the record: At exactly the point when the Garbage Trade seems like a waste of money….is exactly the time to consider putting it on.
Jay Kaeppel Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.
Feb 28, 2014 | Uncategorized
Sometimes you can just tell when something is going to turn around? Like for instance, when I write an article about a trend that has been playing out time and time again over a several year period – that can pretty much be counted on to put an end to that trend (sorry for the paranoia, but as far as the markets go, it’s a “learned response”).
So with that word of warning in place, here goes.
The ETF ticker VXX is intended to track the widely followed VIX Index. And it does in a sense, expect that really it doesn’t. To better understand that seeming bit of gibberish simply glance at Figure 1. In the top clip you see the actual VIX Index. In the bottom clip you see the price action for ticker VXX.
Figure 1 – VIX Index versus the ETF Ticker VXX (Courtesy: AIQ TradingExpert)
Notice any difference? While VIX has been trending sideways for some time now, VXX has been in a steady decline for several years – with a series of upward “spikes” along the way. Now the reason for this is something known as “Contango” and has to do with the fact that ticker VXX holds futures contracts and the prices for the further out months is generally always higher than the nearer months, blah, blah, blah. Forgive my laziness, but for those with intellectual curiosity regarding contango may I suggest the following link:
www.google.com Then type in the word contango.
And don’t even get me started on “backwardation.”
As with any persistent trend that I might find in the markets, as a proud graduate of “The School of Whatever Works”, my interest – an all candor – is not so much in asking “Why”, but rather, “How Often” and “How Consistently.” So how does one take advantage of the downward bias built into VXX? Well, there are lot’s possibilities, but let’s look at one specific approach.
Whacking The VXX Mole
Basically the “theory” is that over the long run the downward bias in VXX will persist (with inevitable periods of strength. So the idea is simply that every time VXX “pops it’s head up”, we whack it and play the downside. The best way to do this – in my opinion – is with put options on VXX. The alternative is to sell short shares of VXX, but that involves unlimited risk, and potentially a lot of it – if something unexpectedly bad happens that affects the stock market, VXX is capable of shooting a great deal higher in a short period of time. Buying a put option on VXX at least insures limited risk.
One Way to Identify “Clobberin’ Time”
Just to make things needlessly complicated I am going to use something called “RSIAll”. RSIAll is simply the simple average of the 2-day RSI, the 3-day RSI and the 4-day RSI for ticker VXX. This indicator appears in the bottom clip in Figure 2.
So the play is simply this:
-When RSIAll rises to 80 or above (or some other value of your choosing)
-Look to sell short (i.e., buy put options on) VXX when it takes out the low of the previous two reading days.
Figure 2 displays several examples.
Figure 2 – Ticker VXX with several “Whack a VXX” opportunities highlighted (Courtesy: AIQ TradingExpert)
The other “key” is deciding when to get out. I am not going to address specifics in this article but there are many possibilities:
*First profitable close
*x-day RSI drops below y
*Some other indicator reaches oversold levels
*Etc.
Which Option to Buy
As far as which specific put option to buy, I am going to go with the “there is not necessarily one best option to trade” answer. Different traders have different levels of aggressiveness and risk tolerance when it comes to choosing trades. In general the shorter-term the option the greater the potential if you are exactly correct in your timing, but the more quickly you can lose money if the VXX goes sideways to higher for a while. So as a rule of thumb I would say it is better to consider options with a minimum of 30 days left until expiration. Beyond that, the basic choices are:
1) The lowest “Percent to Double”: This calculation measures how far the underlying must move in order for the option to double in price. This typically involves buying out-of-the-money options and is considered more of a “high risk, high reward” choice compared to the other choices that follow.
2) The highest “Gamma”: For people who don’t know the option “Greeks”, it can be boiled down pretty simply. “Delta” tells you how much the option should move if the underlying moves $1 in price. So a “Delta” of 50 means that if the underlying security moves $1 in price the option will move (roughly) fifty cents.
“Gamma” tell you how much the “Delta” will change if the underlying moves $1 in price. In more general terms “Gamma” can guide you to options with the most immediate “bang for the buck.”
3) Deep-in-the-money puts: This choice offers the least leverage but also limits the negative effect of time decay (because there simply isn’t much time premium built into the option price) and can start making money point-for-point with the underlying fairly quickly.
Summary
Now that I have planted the idea that playing the short side of VXX is a good idea I would not be surprised to see some unforeseen event cause volatility to trend sharply higher in the not too distant future. But remember, the purpose of this article is not to compel you to “take the next trade”, but to identify and consider opportunities that may occur on a fairly consistent basis into the future.
Jay Kaeppel Chief Market Analyst at JayOnTheMarkets.com and AIQ TradingExpert Pro (http://www.aiq.com) client
Jay has published four books on futures, option and stock trading. He was Head Trader for a CTA from 1995 through 2003. As a computer programmer, he co-developed trading software that was voted “Best Option Trading System” six consecutive years by readers of Technical Analysis of Stocks and Commodities magazine. A featured speaker and instructor at live and on-line trading seminars, he has authored over 30 articles in Technical Analysis of Stocks and Commodities magazine, Active Trader magazine, Futures & Options magazine and on-line at www.Investopedia.com.
Feb 20, 2014 | Uncategorized
Thursday night, I talked about the Baby Boomers and the impact they were having on government spending and the economy. Federal entitlement programs represent a large portion of the U.S Federal budget, and when you combine these programs with the interest on the debt, there isn’t much left over to run the country. As a matter of fact, there isn’t anything left over, and that’s why we need to borrow money every month just to keep the government running (and pay for things like Social Security, Medicare and Medicaid).
So during the Class, I polled the 61 students and asked them to raise their hand if they wanted to reduce Social Security. Nobody raised their hand.
Then I asked if anyone was in favor of reducing Medicare. Same thing, nobody raised a hand.
Finally, after talking about the enormous debt that we were creating with all these programs and the problems they were creating for the economy, I asked if anyone was in favor of reducing Medicare. Again, nobody raised their hand. Not one person in the Class was in favor of reducing or stopping any of these entitlement programs.
After the discussion, I showed them a chart (attached) of the current debt and how it has continued to grow over the years. I pointed out how the debt has grown independent of who was president. It grew because the majority of people in America want their entitlements.
I then showed my students another chart (also attached) that depicts how the number of seniors will continue to grow in the next 25 years, adding to the debt.
After discussing the problems this enormous debt was creating for the economy and the job market, we talked about how the debt could be reduced or paid off.

I asked if anyone was in favor of increasing taxes. Not one hand went up. I asked if anyone would vote for a politician who wanted to raise taxes. Again, not one hand was raised. Hmmm?
So it appears that everybody wants to keep receiving the benefits, but really doesn’t want to pay for them.
Because of this, huge Federal deficits and increasing debt will likely continue in the future. So you need to ask yourself about interest rates. Will they be going up or down? You really don’t need Janet Yellen to tell you this. All you need to do is think about the interest payments on the current debt. They MUST stay low, not for the next few months, or years, but for the foreseeable future…and beyond. If interest rates start to rise, and people want to keep their entitlements, the government will have to borrow even more money, requiring even more interest to be paid to foreigners. The debt is so big now; it will likely NEVER be paid off.
So now you can understand why the Fed MUST do everything in its power to keep interest rates low. It’s not a question of stimulating the economy anymore; it’s a matter of survival!
OK, so how do we deal with this? Well, IF we know that interest rates will likely stay low in the future, we should focus on investments that should do well in a low interest environment.
Several come to mind, like utilities and the banks.
Utilities borrow a lot of money to keep their plants running and expand their facilities to meet the needs of a growing population. They are extremely interest rate sensitive.
I haven’t talked about the utes much on these pages, mainly because almost all of the Fed’s stimulus money was going into other sectors driving the Dow Industrials and NASDAQ technology stocks higher. But this could start to change in the months ahead.
As the Dow moves beyond 16,000, investors, especially seniors, are becoming more risk adverse. Most are only in the market now because they are being forced into it by the government’s low interest rate policy. They can’t live on the interest they receive from CDs or Money Market funds.
But now that the overall market is starting to look overbought and the utilities are near their lows, they are becoming more and more attractive.
Near the end of last year, I started to talk about Consolidated Edison, ED, my favorite Christmas stock. The ‘trade’ didn’t work out this year as ED turned negative after a small pop in mid-November. The stock was in a downtrend when we first looked at it, and wasn’t ready to move higher.
But now, a clear TLB pattern has formed and the PT indicators have turned Green once again. I’m ready to give it another shot. So I will be buying a few shares of ED on Tuesday as a ‘trade’. These shares will go into my IRA account. Remember, ED is still in a down trend, so I can’t fall in love with it. But IF the PT indicators stay Green and it ‘Jumps the Ropes’, I’ll start to add additional shares.
Finding stocks to take advantage of the low interest environment will be the focus of my Big Picture Strategy for 2014. And contrary to popular belief, not all stocks will be able to do this. I’ll discuss why in the days ahead, but it mostly has to do with jobs and the economy.
Fed day pay day
Talking about the Fed. I’m teaching a very special hour long seminar on March 13. 2014 and I’d like to see you there. During this seminar you’ll learn how to cash in on fed day and get two BONUS insights included. It’s perfect for exploiting the fed day.
Feb 10, 2014 | Uncategorized
This Traders’ Tip is based on “The Degree Of Complexity” by Oscar Cagigas in the February issue of
Stocks & Commodities.
The five Donchian breakout systems described by Cagigas in his article are coded using the following rules:
System |
Entry rule |
Exit rule |
Entry price formula |
Exit price formula |
2 Param-Long |
Buy2P |
ExitBuy2P |
Buy2Ppr |
ExitBuy2Ppr |
2 Param-Short |
Sell2P |
ExitSell2P |
Sell2Ppr |
ExitSell2Ppr |
4 Param-Long |
Buy4P |
ExitBuy4P |
Buy4Ppr |
ExitBuy4Ppr |
4 Param-Short |
Sell4P |
ExitSell4P |
ell4Ppr |
ExitSell4Ppr |
6 Param-Long |
Buy6P |
ExitBuy6P |
Buy6Ppr |
ExitBuy6Ppr |
6 Param-Short |
Sell6P |
ExitSell6P |
Sell6Ppr |
ExitSell6Ppr |
8 Param-Long |
Buy8P |
ExitBuy8P |
Buy8Ppr |
ExitBuy8Ppr |
8 Param-Short |
Sell8P |
ExitSell8P |
Sell8Ppr |
ExitSell8Ppr |
9 Param-Long |
Buy9P |
ExitBuy9P |
Buy9Ppr |
ExitBuy9Ppr |
9 Param-Short |
Sell9P |
ExitSell9P |
Sell9Ppr |
ExitSell9Ppr |
The EDS code file has the backtests already set up for all of these long and short rules. In Figure 5, I show a typical setup for the pricing. In Figure 6, I show a typical setup for the exit rule.

FIGURE 5: AIQ. Here is a typical setup for the pricing portion of the backtests.
FIGURE 6: AIQ. Here is a typical setup for the exit portion of the backtests.
!THE DEGREE OF COMPLEXITY
!Author: Oscar G. Cagigas, TASC Feb 2014
!Coded by Richard Denning 12/7/13
!www.TradersEdgeSystems.com
! CODING ABBREVIATIONS:
C is [close].
H is [high].
L is [low].
O is [open].
PEP is {position entry price}.
PD is {position days}.
! PARAMETERS:
donLen1 is 40.
donLen2 is 15.
atrLen is 20.
atrMult is 1.0.
atrStop is 4.0.
maLen1 is 10.
maLen2 is 100.
rsiLen is 14.
rsiUpper is 70.
rsiLower is 30.
atrMult2 is 0.6.
minMov is 0.01.
!------------------------------------------------------------------
! AVERAGE TRUE RANGE (AS DEFINED BY WELLS WILDER)
WWE is 2*(atrLen-1).
TR is Max(H - L,max(abs(valresult(C,1) - L),abs(valresult(C,1)- H))).
ATR is expAvg(TR,WWE).
ATR1 is valresult(ATR,1).
!------------------------------------------------------------------
!! RSI WILDER
!To convert Wilder Averaging to Exponential Averaging use this formula:
!ExponentialPeriods = 2 * WilderPeriod - 1.
U is C-valresult(C,1).
D is valresult(C,1)-C.
eLen is 2 * rsiLen - 1.
AvgU is ExpAvg(iff(U>0,U,0),eLen).
AvgD is ExpAvg(iff(D>=0,D,0),eLen).
rsi is 100-(100/(1+(AvgU/AvgD))).
!----------------------------------------------------------------
!BASIC SYSTEM 2P (2 parameters):
HHdL1 is highresult(H,donLen1,1).
HHdL2 is highresult(H,donLen2,1).
LLdL1 is lowresult(L,donLen1,1).
LLdL2 is lowresult(L,donLen2,1).
Buy2P if H > HHdL1.
ExitBuy2P if L < LLdL2.
Sell2P if L < LLdL1.
ExitSell2P if H > HHdL2.
Buy2Ppr is max(O,HHdL1 + minMov).
ExitBuy2Ppr is iff(ExitBuy2P,min(O,LLdL2 - minMov),C).
Sell2Ppr is min(O,LLdL1 - minMov).
ExitSell2Ppr is max(O,HHdL2 + minMov).
!-----------------------------------------------------------------
!FOUR PARAMETER SYSTEM 4P:
Buy4P if H > HHdL1 and valrule(TR < atrMult*ATR,1).
EB4P1 if L < LLdL2.
EB4Pval is PEP - atrStop*valresult(ATR,PD).
EB4P2 if L < valresult(EB4Pval,1).
ExitBuy4P if EB4P1 or EB4P2.
Sell4P if L < LLdL1 and valrule(TR < atrMult*ATR,1).
ES4Pval is PEP + atrStop*valresult(ATR,PD) .
ES4P1 if H > HHdL2.
ES4P2 if H > valresult(ES4Pval,1).
ExitSell4P if ES4P1 or ES4P2.
Buy4Ppr is max(O,HHdL1 + minMov).
ExitBuy4Ppr is iff(EB4P1,min(O,LLdL2 - minMov),
iff(EB4P2,min(O,valresult(EB4Pval - minMov,1)),-99)).
Sell4Ppr is min(O,LLdL1 - minMov).
ExitSell4Ppr is iff(ES4P1,max(O,HHdL2 + minMov),
iff(ES4P2,max(O,valresult(ES4Pval + minMov,1)),-99)).
!----------------------------------------------------------------
!SIX PARAMETER SYSTEM 6P:
SMA1 is simpleavg(C,maLen1).
SMA2 is simpleavg(C,maLen2).
Buy6P if H > HHdL1 and valrule(TR < atrMult*ATR,1)
and valrule(SMA1 > SMA2,1).
EB6P1 if L < LLdL2.
EB6Pval is PEP - atrStop*valresult(ATR,PD).
EB6P2 if L < valresult(EB6Pval,1).
ExitBuy6P if EB6P1 or EB6P2.
Sell6P if L < LLdL1 and valrule(TR < atrMult*ATR,1)
and valrule(SMA1 < SMA2,1).
ES6Pval is PEP + atrStop*valresult(ATR,PD) .
ES6P1 if H > HHdL2.
ES6P2 if H > valresult(ES6Pval,1).
ExitSell6P if ES6P1 or ES6P2.
Buy6Ppr is max(O,HHdL1 + minMov).
ExitBuy6Ppr is iff(EB6P1,min(O,LLdL2 - minMov),
iff(EB6P2,min(O,valresult(EB6Pval - minMov,1)),-99)).
Sell6Ppr is min(O,LLdL1 - minMov).
ExitSell6Ppr is iff(ES6P1,max(O,HHdL2 + minMov),
iff(ES6P2,max(O,valresult(ES6Pval + minMov,1)),-99)).
!---------------------------------------------------------------
!EIGHT PARAMETER SYSTEM 8P:
Buy8P if H > HHdL1 and valrule(TR < atrMult*ATR,1)
and valrule(SMA1 > SMA2,1) and valrule(RSI >= rsiUpper,1).
EB8P1 if L < LLdL2.
EB8Pval is PEP - atrStop*valresult(ATR,PD).
EB8P2 if L < valresult(EB8Pval,1).
ExitBuy8P if EB8P1 or EB8P2.
Sell8P if L < LLdL1 and valrule(TR < atrMult*ATR,1)
and valrule(SMA1 < SMA2,1) and valrule(RSI <= rsiLower,1).
ES8Pval is PEP + atrStop*valresult(ATR,PD) .
ES8P1 if H > HHdL2.
ES8P2 if H > valresult(ES8Pval,1).
ExitSell8P if ES8P1 or ES8P2.
Buy8Ppr is max(O,HHdL1 + minMov).
ExitBuy8Ppr is iff(EB8P1,min(O,LLdL2 - minMov),
iff(EB8P2,min(O,valresult(EB8Pval - minMov,1)),-99)).
Sell8Ppr is min(O,LLdL1 - minMov).
ExitSell8Ppr is iff(ES8P1,max(O,HHdL2 + minMov),
iff(ES8P2,max(O,valresult(ES8Pval + minMov,1)),-99)).
!----------------------------------------------------------------
!NINE PARAMETER SYSTEM 9P:
Buy9P if H > HHdL1 and valrule(TR < atrMult*ATR,1)
and valrule(SMA1 > SMA2,1) and valrule(RSI >= rsiUpper,1)
and valrule(TR > atrmult2*ATR,1) .
EB9P1 if L < LLdL2.
EB9Pval is PEP - atrStop*valresult(ATR,PD).
EB9P2 if L < valresult(EB9Pval,1).
ExitBuy9P if EB9P1 or EB9P2.
Sell9P if L < LLdL1 and valrule(TR < atrMult*ATR,1)
and valrule(SMA1 < SMA2,1) and valrule(RSI <= rsiLower,1)
and valrule(TR > atrmult2*ATR,1) .
ES9Pval is PEP + atrStop*valresult(ATR,PD) .
ES9P1 if H > HHdL2.
ES9P2 if H > valresult(ES9Pval,1).
ExitSell9P if ES9P1 or ES9P2.
Buy9Ppr is max(O,HHdL1 + minMov).
ExitBuy9Ppr is iff(EB9P1,min(O,LLdL2 - minMov),
iff(EB9P2,min(O,valresult(EB9Pval - minMov,1)),-99)).
Sell9Ppr is min(O,LLdL1 - minMov).
ExitSell9Ppr is iff(ES9P1,max(O,HHdL2 + minMov),
iff(ES9P2,max(O,valresult(ES9Pval + minMov,1)),-99)).
!----------------------------------------------------------------