January 20

4 comments

A Project for TradeStation Day-Traders

By George Pruitt

January 20, 2020


Here is a neat little day trader system that takes advantage of what some technicians call a “CLEAR OUT” trade.  Basically traders push the market through yesterday’s high and then when everybody jumps on board they pull the rug out from beneath you. This strategy tries to take advantage of this. As if it's OK, but it could be made into a complete system with some filtering. It's a neat base to start your day-trading schemes from.

But first, have you ever encountered this one when you only want to go long once during the day?

I have logic that examines market Position, and if it changes from a non-1 value to 1 then I increment buys Today. Since there isn’t an intervening bar to establish a change in marketPosition, then buys Today does not get incremented and another buy order is issued. I don’t want this. Remember to plot on the @ES.D.

Here’s how I fixed it and also the source of the CLEAR-OUT day-trade in its entirety. I have a $500 stop and a $350 take profit, but it simply trades way too often. Have fun with this one – let me now if you come up with something.

inputs: clearOutAmtPer(0.1),prot$Stop(325),prof$Obj(500),lastTradeTime(1530);

vars: coBuy(false),coSell(false),buysToday(0),sellsToday(0),mp(0),totNumTrades(0);

If d <> d[1] then
Begin
coBuy = false;
coSell = false;
buysToday = 0;
sellsToday = 0;
totNumTrades = totalTrades;
end;

mp = marketPosition;
If mp[1] <> mp and mp = 1 then buysToday = buysToday + 1;
If mp[1] <> mp and mp = -1 then sellsToday = sellsToday + 1;

If h > highD(1) + clearOutAmtPer * (highD(1) - lowD(1)) then coSell = true;
If l < lowD(1) - clearOutAmtPer * (highD(1) - lowD(1)) then coBuy = true;

If totNumTrades <> totalTrades and mp = 0 and mp[1] = 0 and positionProfit(1) < 0 and entryPrice(1) > exitPrice(1) then buysToday = buysToday + 1;
If totNumTrades <> totalTrades and mp = 0 and mp[1] = 0 and positionProfit(1) < 0 and entryPrice(1) < exitPrice(1) then sellsToday =sellsToday + 1;

totNumTrades = totalTrades;

If buysToday = 0 and t < lastTradeTime and coBuy = true then buy ("COBuy") next bar at lowD(1) + minMove/priceScale stop;
If sellsToday = 0 and t < lastTradeTime and coSell = true then sellShort ("COSell") next bar at highD(1) - minMove/priceScale stop;

setStopLoss(prot$stop);
Setprofittarget(prof$Obj);
setExitOnClose;

George Pruitt

About the author

I have a degree in computer science from UNC-Asheville. I was the Director of Research for Futures Truth (magazine and CTA) for 31 years and have authored many articles in magazines and trade journals. I have written and co-written eight books: The Easing into EasyLanguage Series (four books): Foundation, Hi-Res, Advanced Topics and DayTrade edition. Older books published by John Wiley: The Ultimate Trading Guide, Building Winning Trading Systems with TradeStation (two editions), The Ultimate Algorithmic Trading System Toolbox, Trend Following Systems-A DIY Project: Batteries Included! My research is now focused on day-trading and longer-term trend following systems.

  • Just to be clear, these strategy results are without slippage and commission, correct? So, best case, with costs included this is just a breakeven strategy at best (and probably worse) – amiright?

  • {"email":"Email address invalid","url":"Website address invalid","required":"Required field missing"}

    Learn To Code & Build Strategies
    Using EasyLanguage. 

    >