Quote from Argent:
...
So for example if I want to test the hypothesis that an intraday retrace to the open is a tradeable event, I write really simple code that describes the retrace and plug it into the structure.
Sorry Argent (or anyone to answer), don't mean to catch you off guard with a serious response, it's just my sense of humor is not very good; people usually don't laugh at my comments, just respond with dirty looks
I'll describe-code this instead of real code, because my app is in C#, not eSignal.
I've seen these coded in 2 different styles:
1) compare the highs/lows/opens/closes simply with greater than or less than signs ( < and > )
2) do some more math to check the highs/lows/opens/closes differ by some fixed or percentage amount
3) use some indicator values
which one do you use?
Since this is "interactive", here's my noobie guess:
For a retrace, I'd code as:
- the opening bar (or 2 or 3) moves away from the day open by dMoveAway amount or percent
- then the next couple of bars hang or stall or range (defined as the highs and lows do not exceed dHighRange and dLowRange amounts)
- then in the next couple of bars the low or high gets within dNearOpen amount or percent of the daily open
- more code to figure out if the retrace was coming down or going up
- more code to test if the trade should be in direction of the opening move or the retrace direction
- run backtest, interpret results, look for win/loss ratio, win/loss amounts, drawdown, effect of changing parameters, OOS comparison, and more
Looks like I'm in the #2 style, checking differences by some amount.
Indecision: should it be #1 style, for simplicity, but with no shape? Or #2 style, to better define the shape, but with more parameters that risk curve fitting? Always interested to hear other ideas and perspectives.
thanks