Unicorns


This post was contributed by a guest author, and does not necessarily reflect the views of Richard or MovetheMarkets.com


What’s your Unicorn? :)

Ok in the news.
Today I suffered with my cache of prior data loss due to a uninstall/reinstall of multicharts (which also blew my eotpro). Recient consolidations in the futures + bugs still in the new Multicharts beta seem to be the root.

Lately I’ve been beating my head against a programing wall, having incremental successes understanding Mulicharts and Easy Language.

Having been inspired by the Rainbows I gave writing one a shot, turned out neat and is already there as a Moving Average Ribbon Indicator (that I found later… sheash) I boiled them down to 3 weighted moving average lines.

Big Deal, Everyone is doing it right?

I watched them wash above and below the price and gave writing a Signal in Multicharts a go.

Now remember I was enticed by the Channel Breakouts involving a lengh of bars back Highest high or Lowest Low.

Many rapid prototypings later (and using sword names as naming conventions) I present “Claymore”.

Lets Visualize this.. In easy language…

Claymore Visualization

inputs: Price(close),length(25), ma1(16), ma2(42), ma3(79);

variables:
AvgPrice (0),
RedValue (0),
GreenValue (0),
BlueValue (0),
TheSpread( 0 );

RedValue = waverage(price,ma1);
GreenValue = waverage(price,ma2);
BlueValue = waverage(price,ma3);

Value2 = GradientColor( slowk(length), 0, 100, rgb(255,0,0), rgb(0,250,250));
setplotcolor(99, value2);
TheSpread=TypicalPrice-BlueValue;
plot99(TheSpread,”Typ Avg”);
setplotwidth(99,2);

TheSpread=redvalue-bluevalue;
setplotcolor(1,rgb(255,32,32));
plot1(TheSpread,”RedLine”);

TheSpread=greenvalue-bluevalue;
setplotcolor(2,rgb(32,255,32));
plot2(thespread,”GreenLine”);
setplotwidth(2,2);

setplotcolor(3,rgb(32,32,255));
plot3(0,”BlueLine”);
setplotwidth(3,4);

So the ma3 line BECOMES the zero line. Neat huh?
You can really see when the Typical Price crosses with the RGB lines.

So.. A Signal. A Naked one at that. The null input activates a nacient stop loss that I need to figure out to make more robust.

the ma1-3 lines here were optimized for 10000 pt Original (due to the history data loss I had to use 10k Pt instead)

When you run this Signal, you will need to goto Format Objects, Properties Button, set max number of bars to reference to equal or greater than your ma3 number (for when you run some optimizations)

By the way, be sure to set a rough guess what your commissions per trade or share might be in the Properties Button AND Fixed Shares/Contracts to 2 (for future take ticks of profit on initial moves)

Signal Claymore

[IntrabarOrderGeneration = false]
inputs: null(0), ma1(16), ma2(42), ma3(79), price(close), priceh(High), pricel(low), StopLoss(291), BreakEven(80);

vars:
MP(0),
TP(0),
RedLine(0),
GreenLine(0),
BlueLine(0);

TP = typicalprice;

Redline = waverage(price,ma1);
greenline = waverage(price,ma2);
blueline = waverage(price,ma3);

if tp crosses below blueline
and greenline > blueline
then begin
SELLShort(”CM SE”) this bar;
end;

if tp crosses above blueline
and greenline < BlueLine
then begin
buy("CM LE") this bar ;
end;

if null <> 0 then begin
SetStopLoss(StopLoss);
SetBreakEven(BreakEven);
end;

I PAPER traded $450 off of 1 contract. The total run was like what.. 17.5 ES points? Yikes.

This method is just getting started. Doesn’t scalp worth a damn. It breaks the rules with not having real Money Management (ie stop loss and trailing stops) in it.

You get to watch the curves and move your stops accordingly.
You could add language to “sell” or “buy to cover” open positions based on MarketPosition and when the Typical Price crosses back over a red or green line. All sorts of fun here.

These types of Signals are prone to a high trade count. Future investigation into BarsSinceEntry are in order as well.

A Pretty Picture..
Claymore


This post was contributed by a guest author, and does not necessarily reflect the views of Richard or MovetheMarkets.com


Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.