[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Coding MaxLoss and ProfitTarget Stops



PureBytes Links

Trading Reference Links

Herman

The attached gif gives a visual representation of how I create the Williams But Stop. The white
spikes, overlaid without scale, are buy signals and have the same value as the dotted white line
when the spike occurs (H>dotted white line). A sell signal is given when the LOW penetrates below
the dotted black line. The yellow spike is an exit signal for a 12% gain from the first entry
signal.

I note with interest that the Turtle Soup  buy and sell appear to be close to the reverse of my
understanding of the "Williams" signal in my gif.

The differences between the profit stop I posted and the results from MS can be explained by the
fact that MS includes commissions in its calculations, while my code does not.

When MS is NOT set to "exit on the price" the HIGH for the day is irrelevant as the profit is
calculated on the selected exit price, usually OPEN or CLOSE. The stop will only activate when the
chosen exit price can deliver the required net gain.

When "exit on the price" is enabled then the equity after the exit will always be the greater than
the starting equity by the chosen percentage, regardless of commissions.

> >I have yet to check any of these against MS but will do so over the next few days. For the life
of me I can't see how MS stops can execute at tradeable steps - see comments on code further down.
With Profit Stop I have added some code to convert the stop value to the next higher ASX tradeable
step. Similar code could be added to a stop loss or exit stop by those who need it (i.e. have their
own stop capable system tester).>
>
> You lost me here, care to explain?

On the ASX share price increments are 1 tenth of a cent for issues under 10c, 1 half of a cent for
issues between 10c and 50c, and 1 cent for issues above 50c. As an example of what I am on about, it
is not possible to sell shares at 49.7c just because that is the value at which the shares reach a
predetermined profit level. One has to decide whether to sell at 49.5c or 50c. At times the OPEN or
CLOSE price can be an intermediate value, but not during the trading day. So how one calculates an
exit point is very relevant to system testing.

Roy

Attachment: Description: "snap.gif"