PureBytes Links
Trading Reference Links
|
Frans/
You're right and I found the same thing this evening. There was a flaw
in the logic. Just because the close is below HiLimit doesn't
necessarily mean that it's below LoLimit. If you change the Expert
Advisor as follows, this will give you a few black and white bars where
the close is between the two. Hope this solves it for you.
Name: Uptrend
Condition: C>=FmlVar("Trading the Trend","HILIMIT")
Name: Downtrend
Condition: C<=FmlVar("Trading the Trend","LOLIMIT")
Harvey Pearce, Victoria, B.C., Canada
=====================================
derksenf wrote:
>
> Hi Harvey,
>
> Here's the formula I typed in the Indicator builder:
>
> Pds:=21;
> Mult:=3;
> TruRan:=Mov(ATR(1),Pds,W)*Mult;
> HiLimit:=HHV(H,Pds)-TruRan;
> LoLimit:=LLV(L,Pds)+TruRan;
> If(C>HiLimit,HiLimit,LoLimit)
>
> I used exactly the same formula to refer to by the Expert.
>
> As I told you before it works fine in over 99% of the time, showing me nice
> green (the only thing I changed fm your original) bars when C> TTT ind. and
> red ones when C<= TTTind.
>
> Though I'm very clumsy at this I tried to attach a Dow30 chart in HTML
> format, and one in JPEG format just to show you what I mean. The message
> left my machine but never bounced back to me so I guess my "bitties" are
> forever floating in cyberspace.
> While sending I realised how much time was used, and I sent out an excuse to
> all.
>
> Anyway The dates are: Nov 10 and 11 and Dec 12 1997 are the wrongdoers. I
> loaded enough data. I even restarted (you never know)
>
> - I'm just curious if other list-friends have the same experience and would
> like to know why MS6.5 sometimes and suddenly makes this mistake ??? -
>
> Is it the little W95 devil at work ? Something wrong with the co-processor
> in my P-133 ? Something wrong with my eyes ?
>
> What happens when you apply this Expert to the DJ30 on your MS6.5 ?
>
> And maybe mijnheer Ton Maas could lend us a hand with this one ??
>
> I get the same results changing Pds:=21;
> for: Pds:=Input("Lookback Periods?",1,1000,20); where I changed 20 for
> 21(in the hard-code).
>
> Kind Regards,
>
> Frans
>
> At 20:24 5-09-98 -0700, you wrote:
> >Frans/
> >
> >Assuming you entered everything exactly in both the Indicator Builder
> >and the Expert Advisor, one question comes to mind. Did you decide to
> >adapt the formula to MS v.6.5 and use an Input function for Pds and
> >Mult? It seems like a logical thing to do, and in fact I coded it that
> >way at first. The problem is that the Expert Advisor always reverts to
> >the default value (the System Tester does the same thing). Thus if you
> >used something like:
> >Pds:=Input("Lookback Periods?",1,1000,20)
> >and then when you applied it you changed the periods to 15, the Expert
> >Advisor will still read 20. I hard-coded the Pds and Mult parameters
> >for that reason.
> >
> >Harvey Pearce, Victoria, B.C., Canada
> >=====================================
> >
> >derksenf wrote:
> >>
> >> Harvey,
> >>
> >> You didn't screw up anything. On the contrary you did a superb job. Thank
> >> you so much. It's great in helping me to learn to play and starting to feel
> >> the power of the man with the bowlerhat.
> >>
> >> You already see it coming......
> >>
> >> BUT...as over 90% of the charts I applied it with look good suddenly there
> >> is this defect sneaking in...
> >>
> >> On the DowJones Industrials dates 10 and 11 Nov 97' and Dec 12 '97 the
> >> Uptrend condition, C>FmlVar("Trading the Trend","HiLimit") is true but the
> >> color of the bar is red while it should be blue !! Values for
> >> trading-the-trend-indicator on 10 Nov:7531.31, Close: 7552.59 on Nov 11:
> >> 7504.37, Close 7558.73 and on Dec 12: 7677.98, Close 7878.30
> >>
> >> (Hey, that close is higher than today's. What happened? Thought we all
> >> agreed we would go up forever.....<GG>)
> >>
> >> There are a few more examples I could give you.
> >>
> >> What's going on ? Did I do something wrong ? Is my cpu making mistakes ? or
> >> is it in MS 6.5 ?
> >>
> >> Could you and the rest of the list who is interested (EQUIS-support??) check
> >> this out.
> >>
> >> Regards
> >>
> >> Curious Frans
> >>
> >> (At 17:29 1-09-98 -0700, you wrote:
> >> >John/
> >> >
> >> >An article in the September 1998 TAS&C, "Trading the Trend" by Andrew
> >> >Abraham, was about one form of stoploss exit: subtract some manipulation
> >> >of the true range from the highest high (or add it to the lowest low)
> >> >and exit when the close crosses that. Members of Chuck LeBeau's Traders
> >> >Club will recognise the "Chandelier Exit".
> >> >
> >> >Here's my version of it (for MS v 6.5). I've written it this way to
> >> >make it easy to change the lookback periods and the multiplier.
> >> >
> >> >Name: Trading the Trend
> >> >
> >> >Pds:=21;
> >> >Mult:=3;
> >> >TruRan:=Mov(ATR(1),Pds,W)*Mult;
> >> >HiLimit:=HHV(H,Pds)-TruRan;
> >> >LoLimit:=LLV(L,Pds)+TruRan;
> >> >If(C>HiLimit,HiLimit,LoLimit)
> >> >
> >> >1. After closing the Indicator Builder click on the Expert Advisor (the
> >> >guy in the bowler/derby hat).
> >> >2. Click on New, then the Name tab, type in Trading the Trend.
> >> >3. Click on the Highlights tab, select the first line so that it is
> >> >highlighted, click Edit, type in the name Uptrend, select Colour Blue,
> >> >select Condition, type in C>FmlVar("Trading the Trend","HiLimit"),click
> >> >OK,
> >> >4. Still on the Highlights tab, select the second line, click Edit,
> >> >type in the name Downtrend, select Color Red, select Condition, type in
> >> >C<=FmlVar("Trading the Trend","HiLimit"), click OK, click OK again.
> >> >5. If you have a chart open that you want to use this on, click Attach,
> >> >otherwise click Close. In the latter case, when you open a chart and
> >> >plot the trendline, click on the Expert Advisor, select Trading the
> >> >Trend, and click on Attach.
> >> >
> >> >I've given the Expert steps in detail for any who may not be familiar
> >> >with its use. To experiment with variations in the lookback periods and
> >> >the multiplier you can do so in either the Indicator Builder, or
> >> >right-click the indicator on the chart, select Properties, then the
> >> >Formula tab, and make the changes (e.g. try a lookback period of 10, and
> >> >a multiplier of 2.5). As implemented above, the Expert should change
> >> >accordingly. This shows the trade-offs that have to be made between
> >> >near and distant stops. This is too rudimentary to be traded as a
> >> >system - the whipsaws would chop you to pieces - but the exits should
> >> >help to limit drawdowns.
> >> >
> >> >A very similar stoploss is given in Chande & Kroll "The New Technical
> >> >Trader", pp.167 - 169, "Volatility-Based Trailing Stops". My preference
> >> >is to plot both the high and the low exit lines in contrasting colours,
> >> >dispensing with the switch between them, and dispensing with the
> >> >Expert. If anyone wants help with the code, just say so. And if I've
> >> >screwed something up again, say so.
> >> >
> >> >Harvey Pearce, Victoria, B.C., Canada
> >> >=====================================
> >> >
> >> >
> >> >John Manasco wrote:
> >> >>
> >> >> After reading several posts recently by some new and old participants in
> >> >> the list I would like to start a discussion of my favorite subject,
> >> >> namely loosing money. It seems there is a lot of confusion about when to
> >> >> get out of a stock or commodity. Most of that confusion is between my
> >> >> ears.
> >> >>
> >> >> First when you purchase a stock or commodity when do you pull out if the
> >> >> position moves against you? Second, how much do you let your position
> >> >> fall thinking that it's just a retracement a will continue the move?
> >> >> Could someone explain how to use stops properly? Especially trailing
> >> >> stops. Do I need em? I am getting mad watching my profits evaporate and
> >> >> go into losses.
> >> >>
> >> >> Last week I went flat in my portfolio. I sold all my stocks and kept all
> >> >> my option straddles. Then I fretted all week that I had missed the
> >> >> bottom and would miss the next up move. That's when I realized I have
> >> >> too much emotion involved in my decisions. I have always said I don't
> >> >> have a good exit strategy but I didn't realize just how much my emotions
> >> >> were playing into it. Now I question my entry strategy too, and that's
> >> >> pretty much mechanical. The subjective part is whether or not to
> >> >> actually put the trade on.
> >> >>
> >> >> Everyone tells me about fear and greed dominating trading decisions. I
> >> >> also think I have listened too long about my time frame and goals. I
> >> >> have been investing for ten years and trading for maybe five. Over that
> >> >> time people have told me to invest for the long run, let my profits
> >> >> ride, don't be swayed by short term blips, decide what time frame I want
> >> >> to trade and all the other admonitions about trading. This has served to
> >> >> confuse me more than help me as I made the transition from investor to
> >> >> trader.
> >> >>
> >> >> So I admit it, I sometimes lose money because of my exit strategies. A
> >> >> lot more than I would like to admit. So what are some of your thoughts
> >> >> on exiting a position. I really hope I get a lot of feedback on this
> >> >> because this is really important to me, and it seems to a lot of other
> >> >> people too.
> >> >>
> >> >> John Manasco
> >> >
> >> >
> >
> >
|