iBankCoin
Joined Nov 11, 2007
1,458 Blog Posts

First Attempt at Pivot-Based System

Carsten’s post about a simple pivot-based trading system was intriguing to me mainly because I have never tried to code such a system. I guessed that coding a proof-of-concept of the system would be pretty easy, and it was.

Here is the code for Tradestation:

inputs:
ATRLength( 10 ), // I used Average True Range as a substitute for Carsten’s “volatility.”
Length( 10 );

variables:
ATR( 0 ),
S1( 0 ),
R1( 0 ),
PP ( 0 );

ATR = AvgTrueRange( ATRLength ) ;
PP = close[1];
S1 = PP – ATR;
R1 = PP + ATR;
If close <= S1 then buy next bar at market;
If close >= R1 then sell short next bar at market;

If currentbar > 1 and marketposition = 1 and close = highest(close, 3) then sell (“LX”) next bar at market;
If currentbar > 1 and marketposition = -1 and close = lowest(close, 3) then buytocover (“SX”) next bar at market;

Here are the results and the equity curve. I assumed 10K starting equity, purchasing only one contract per trade, with no compounding of gains.

Not bad for a first pass. The equity curve is not nearly as nice as Carsten’s version, but again, this was more for practice than anything else.

Below are some recent trades:

Caveats:

I know very little about pivot points, how to calculate them, how to trade them, etc. I need to do much more reading on the subject.

I also know very little about trading S&P E-minis and need to complete more study on trading them as well.

This system can obviously be improved. Right now it suffered some large drawdowns and was underwater for well over 100 trades.

I’m hoping the collective wisdom of the community here can help produce an improved V1.1

If you enjoy the content at iBankCoin, please follow us on Twitter

10 comments

  1. Danny

    As I mentioned last time you mentioned this. I have been working on something similar, I’ll send you some things when I get finished with them

    Good shit Shedderiah.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  2. alphadawgg

    Pivot points are figments of a trader’s imagination, with no logical basis. They are self fulfilling prophecy points, once enough people believe in them====and they do.

    Here’s another that’s gaining poplularity.

    http://www.camarillaequation.com/interview.html

    Read the dialogue with Nick Stott—he even admits that it’s all about “believability”.

    Basically, tail-wagging-the-dog stuff.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  3. Woodshedder

    Alpha, for the pivot point, all that was used was the previous day’s close, plus or minus volatility. Of course traders will pay attention to the previous day’s close. I don’t know enough about pivot points to agree or disagree with you.

    That Nick guy sounds like a snake oil salesman. I’d like to see 3rd party audited results of his “equation.”

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  4. Dave

    The Camarilla Equation has been around for at least five years or so and Woodshedder is right in that it is akin to snake oil. We had a client five years ago come over and traded using this thing and the signals are not magical by any means. They might be decent with good risk management but by themselves are just another indicator.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  5. ManuelStop

    Wood: I’ve just thought about this stuff in passing for possible use in a system, but I definitely watch it for day trading because everyone else does–so, Dawgg’s is right in that regard.

    But, in terms of a system it seems like the slope of the trend would be critical in the system. That is, with extreme slopes in one direction or the other (like we’re having now) the likelihood of a stop would increase significantly because the probability of hitting an exit trigger (H of previous 3 days) would decrease. It would seem that decreasing from 3 days to 2 (or less) in a high slope environment might maximize the odds of hitting an exit trigger.

    From backtesting, do you get a feeling that the slope affects it that way?

    The pivot stuff is hard for me to evaluate visually because I can only clearly see intraday pivot action for the last 20 days. If pivots are turned on in my historical charts, it’s impossible to see anything.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  6. Cuervos Laugh

    Uh, the equation is here: Camarilla-equation.blogspot.com

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  7. Woodshedder

    Manual, haven’t considered slope in regards to pivot points. You are probably right though as it makes sense, at least intuitively. It will be easy to test.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  8. Woodshedder

    Cuervo, thanks man. I can’t wait to get that coded up and tested out. Hopefully I’m wrong about the guy. I would love to have another arrow for the quiver.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  9. downsouthjukin'

    Shed,

    Mastering The Trade, by John Carter covers both e-mini and pivot points very well. IMO, it is a great trading book all around.

    Here is a review by tradermike.

    • 0
    • 0
    • 0 Deem this to be "Fake News"
  10. Woodshedder

    Thanks downsouth. That book has been recommended to me so many times it is ridiculous that I have not yet purchased it.

    • 0
    • 0
    • 0 Deem this to be "Fake News"