I’ve been diving into the quant arena since my last trade last year. Figured that I need a MUCH better platform, better broker, better tools of the trade to handle this market. TOS’ datafeed is so inconsistent that it became an additional significant risk to my style of trading. Consequently I decided NOT to trade with them any longer.

After looking at a few dozen brokers/platforms/datafeeds I was stuck in indecision. What I originally expected to be a no-brainer feature was later found out to be,  despite the high demand for it, too rare and too expensive one that wasn’t worth the additional costs to my trading. I’m talking about tape data (time and sales) being available in the strategy building platform(time of every non-filtered trade, price and volume)… so I dropped that idea and just focused on a platform that would be as open as possible to allow maximum implementation of my ideas.

So with the great help of  VOVOR from the ETF PROPHET chat room I’m now focused on the RightEdgeplatform.

I know I have a whole bunch of years of learning ahead of me about how to quantify strategies/indicators/ideas into rigid trading plans but so far I’m just dipping my toes in the water, practicing  pretty simple methods of back testing from the tools that are available to me.

I called this one Magnetic because of the latest SETI lecture I saw recently about the sun’s magnetic field.

OK so here’s the code in ThinkScript:

declare LONG_ENTRY;
# built for daily eur/usd
def AnnualMA = average(hlc3,200);
def MonthlyAndTwoWeekMAs = average(hlc3,20)>average(hlc3,10);
def CrossedBelowThenAboveAnnualMA =
if close[3] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[4] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[5] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[6] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[7] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[8] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[9] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[10] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[11] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[12] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[13] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[14] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[15] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[16] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[17] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[18] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[19] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[20] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[21] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[22] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[23] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[24] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[25] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[26] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[27] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[28] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[29] crosses below AnnualMA
and close[1] crosses above AnnualMA
or close[30] crosses below AnnualMA
and close[1] crosses above AnnualMA then 1 else 0;
# FILTER
def DojiH = ((high – open) / (high – low) * 100);
def DojiL = (AbsValue((close – low) – (high – low)) / (high – low)) * 100;
def inBetween1 = DojiH>35 and DojiH
def inbetween2 = DojiL>35 and DojiL
def NotIfDojisFourAndFiveBarsAgo =
if inBetween1[4] and inBetween2[4] then 0
else if inBetween1[5] and inBetween2[5] then 0 else 1;
#___________________________________________________________
def target = if CrossedBelowThenAboveAnnualMA and MonthlyAndTwoWeekMAs and NotIfDojisFourAndFiveBarsAgo then 1 else 0;
def Condition = if target then 1 else 0;
addorder(condition, close);
declare LONG_Exit;
def stop = if close
def FiftyMA = average(hlc3,50);
def target = if entryprice()==close[2] then 1 else 0;
def condition = if stop then 1 else if target then 1 else 0;
addorder(condition, (high+hlc3)/2);

Related posts:

  1. Euro Trade 10-25-10
  2. KOP Qs
  3. Euro 3-25-10 trade
  4. Fractal Strategy Matrix
  5. Euro Trade 10-20-10