Triple threat exit strategy

DBTT-blank-v1.0.zip (67.9 KB)

I can’t say that I have studied his work. There are so many out there. Regardless of the market, when:
demand > supply = prices rise
&
when demand < supply = prices will fall.

Basic laws of economics are so often forgot about when getting wrapped up in analysis and testing, etc.

Livermore could be correct as markets do set new records both high and low. Although, buying and selling at those levels, respectively, are low probability trades. What TT does is, attempt to capture the trend no matter what direction the market goes or for how long. The job of those Retrace and AIR stops is to keep you in a profitable position for a significant move.

I traded stock options for a while and this hybrid TT was born of a revelation that Pipwoofs TT gave me. This was, ‘Why don’t we use options trading strategies in the forex?’ I thought, 'What if TT was short-term and inverted? Heck, why don’t I use TT and ITT together?"

Alas, I am wondering down a new rabbit hole. I’ll put together something explaining this hybrid beast soon. As for now, I’ll get this spreadsheet uploaded.

Edit: check top of post for. Zip containing the spreadsheet.

Thanks for that response pipwoof; I’ve been working on an excel worksheet myself and was wondering if it was a waste of time because I could have downloaded a gizmo to do the work for me. I’m looking at the prices on Oanda vs the data provided by forexpros, and they are quite different; For example on the site they’re giving me 1.0456 for the close on Aug 2 on the AUD/USD pair, whereas I’m getting 1.04776 on Oanda, so I’m guessing I should be sticking to my own platform since I’m trading with it yea?

On the topic for Oanda users, I’m slightly confused; I’m using the Java launch, and if i’m looking at a daily chart and mouse over a day, on the time line at the top it will tell me a day, but on the bottom left, as well as appearing on my RSI and Stochastics it always says the day previous; which should I be using? o_o I’m assuming it’s the one on the top but some reassurance can’t hurt.


I’ll be sure to dig through all the relevant posts pipwoof provided.

I drop my time frame down to the 15m when preparing to place orders after I get the highs and lows from the daily candle. It happens for me @ 8 pm eastern usa. I have set the fxtrade platform to gmt 0 so that I place trades @ midnight gmt. You’ll see that the daily candle will not close at gmt 0 but will stay open. I just make sure that grab high and lows @ 8 pm eastern us time.
Because I am in the usa, my server is in new York . This makes the daily candle close at midnight eastern us time. That probably explains you time discrepancy

I did some reading up on Livermore. It seems his theory and trading system was to try and capture the most of a bull/ bear market move and not the dips during the ride up or down. You can use these retracements to enter a trend you don’t have a position in.

In theory, TT would have you enter as soon as the market started its run. Then, its up to you to manage the winning position as the market makes its move. The rules suggested here state 1-49 and 1-100 pips of wiggle room for the trade to let the small corrections of supply and demand to take place without taking out your position. Good stuff, if you ask me. So, this system really incorporates the same thought processes the Mr Livermore used.

*remember one of his top precepts *

always mind your trading rules

He said his losses were due to him diverging from his rules.

Yes, that is expected normal operation. As per the triple threat strategy rules (see post 1 of this thread) only the first position is closed at a predetermined Take Profit price. The other two positions (Air and Retrace) are governed by the rules and thus they are not closed by the EA. The EA only sets their new stop losses when needed and then these position are closed by the market movements and not by the EA.

Kindly post your results for friday

Oh, yeah, I forgot that.

RESULTS for 08/03 Total +70 pips

08/03 details
GBPJPY BUY +40 / +15 / +15 (first position reached TP, Air and Retrace stopped out after first SL jump)
GBPJPY SELL @ 121.121 expired, did not trigger
AUDUSD BUY @ 1.05802 expired, did not trigger
AUDUSD SELL @ 1.04337 expired, did not trigger
EURUSD BUY @ 1.24049 expired, did not trigger
EURUSD SELL @ 1.21322 expired, did not trigger
GBPUSD BUY @ 1.56788 expired, did not trigger
GBPUSD SELL @ 1.54885 expired, did not trigger

Running total of results
07/30 -99
07/31 -318
08/01 -573
08/02 -69
08/03 +70

Total -989 pips

Please note however, that for Friday orders I deviated from the original rules. I only started my EA 2 hours before the London open, I had not let it place orders right when the new daily candle opened.

Yeah, That filtered out the loosing GJ short trade.

At the below link is the first beta version of the Londonbreak EA. It is still a work in progress. In this current iteration of the EA, the following rules are observed (numbering as per Bijoymj’s quoted rules above):

#1 rule is observed in the code
#2 rule is implicitly observed :slight_smile: since the user decides which pairs he/she wants to run the EA on
#3 rule is observed with the following modification: GMT time does not observe daylight saving adjustments, however London time does. Therefore I understand this rule is meant to work like this: always enter trades between 09:00 London time (1 hour after the London open) and 17:00 London time, regardless if it is winter time or summer time
#4 rule is observed with the following modification: this “phase” of order placement is between 09:00 and 09:05 London time -> if price in this time period is above/below previous day Low/High, then orders are placed.
#5 rule is observed between 09:05 and 17:00 London time
#6 rule is not yet observed, this needs to be manually handled (but please be aware that if you cancel an order and then later the same order is triggered again as per rule #3 or rule #4, then the EA might place the order again (I don’t know if this is true, this needs to be tested, because I don’t know whether a deleted order keeps its magic number or not and whether it shows up in the order history or not)).
#7 rule is observed by setting an expiration on all the pending orders placed, the EA does not close orders on its own.
#8 rule is not yet observed, this needs to be manually handled, but be aware that in its current iteration, the EA will place an order even if you already have a running order on a currency pair that is in negative “profit”. You can cancel it, but then see the comments on rule #6 above.

The EA will still take previous day high/low data at the time of each individual broker’s forming of a new daily candle. So differences between results are still very much possible, mainly on Monday when high/lows might be wildly different between brokers due to the presence or absence of Saturday/Sunday candles.

Please be aware that due to the programming challenge posed by the fact that there are several brokers with wildly different GMT offsets and the EA needs to be able to determine the correct London time on any broker platform, regardless of the user’s local time, I had to use a so called function library to make the coding of this EA easier. This function library can be checked out here (it’s not coded by me): stevehopwoodforex.com • View topic - Broker-independent time-routine: LibGMT.h (actually to be able to see the code, you need to register on that forum, but it’s free, of course and there are very very useful things there).

Now, to make distribution of this EA easier, I had to compile the EA code together with the above mentioned function library. What this means is that the extension of the EA is now ex4. You still place it into your experts folder, like a “regular” EA, but you are no longer able to just open it with a Notepad and check out the code for yourself. This means that if I’m a baaaad, baaaad person I could theoretically program a virus or some other nastiness into the code and you will have no way of verifying that the code “hidden” inside the ex4 file indeed does what I’m saying it does. So this means that you should only download and use this EA if you personally decide that I’m trustworthy enough for you and you believe that I don’t want to do harm to you or your computer. This is the internet, folks and there might be wolves hiding in a sheep’s clothing, so to speak, so this is a judgement call each of you should make before downloading. I can’t give you any assurances, beside my previous contributions to this forum topic and the fact that I take the words of the Dalai Lama and buddhist teachings in general very seriously, therefore I would never intentionally do harm to another human being. Obviously this can also be a lie, since this is the internet and you should take everything with a grain of salt. :slight_smile:

Anyway with the above warning, the link to the very first beta version of the Londonbreak EA is below, if you have balls of steel you might try testing it next week, I definitely will and post my results here. The rule still applies that this is to be used only on a demo account, you should not take this “out” to a live account. I’ll try and upgrade the EA to observe the remaining two rules (see above), but I feel like I seriously need to take a break from coding for a while, because seriously, sometimes I’m dreaming about the code, these days. :-))

http://www.rpotor.com/forex/TTE/Londonbreak-TT-OrderEntry-v1.01.ex4

Updating this post: I found the solution for the above mentioned trust issues. :slight_smile: Actually the answer is right in the code of the function library I referenced above. :slight_smile: By the rules of the author of the function library I’m required to share with you guys the original code as well. Please find these below:

http://www.rpotor.com/forex/TTE/Londonbreak-TT-OrderEntry-v1.01.mq4
http://www.rpotor.com/forex/TTE/LibGMT.mqh

Now, what this means for you?

If you just decide to trust me, you can download the Londonbreak-TT-OrderEntry-v1.01.ex4 file above, install it like a normal EA and be happy about it.

If you don’t trust me, you can download the Londonbreak-TT-OrderEntry-v1.01.mq4 file (please note the differences in extensions) and also the LibGMT.mqh file. With these two files you can compile the EA for yourself with the MetaEditor that comes with all MT4 installations (LibGMT.mqh needs to be in experts/include). If you’re tech savvy enough you know what I’m saying, if not, ask here and I’ll make a detailed post of how to compile an EA for yourself using the mq4 code.

Update2: Ummm, just one more thing that I forgot. Okay, this is seriously the last update to this post guys, and I’m off from here for the day :slight_smile: When you put this EA on a chart, please make sure that in the window that pops up when you place the EA, you should have “Allow DLL imports” enabled. Why? Because the LibGMT function library I talked about above needs to “ask” your Windows operating system this question: “Hey Windows, could you please tell me what the exact local time of this computer is?” Now, the EA can only do this if you enable “Allow DLL imports”. If you don’t let it do this, Windows will be rude and will not communicate at all with the EA. Then the EA in turn will become a sad panda and refuse to do anything with an error message.

Thanks a lot rporter;

Thanks for your great efforts to code an EA based on the modifications suggested by me in post #292. I am just deciding to trust you and will definitely trial it on a demo account. Results will be posted regularly, so that we can compare our results and try to improve the strategy by further observations and modifications.

Once again thanking you Mr. rporter, for your efforts and great contribution. Thank you.

reviewing, i found an error in the july results reporting. it was just one day for the gpy/jpy, but enough to turn it from a winning month to a losing for this pair. if anyone tries to use this as their basis for comparison, it might have confused them and we want to be as accurate as possible. new july:

gbp/jpy
7-2, sell 124.99, +15, +15, +15
7-5, sell 124.22, -30, -30, -30
7-6, sell 123.82, +55, +55, +55
7-9, buy 123.53, -30, -30, -30
7-10, sell 122.99, be, be, be
7-11, buy 123.56, -5, -5, -5
7-12, buy 123.98, -25, -25, -25
7-16, sell 123.15, +40, +40, +15
7-17, buy 123.36, +35, +10, +10
7-19, sell 123.07, -20, -20, -20
7-20, sell 122.89, +10, +10, +10
7-23, sell 122.25, +25, +75, +75
7-24, sell 121.11, -40, -40, -40
7-25, sell 120.94, -30, -30, -30
7-26, sell, 120.92, -35, -35, -35
7-30, sell 123.25, +25, +75, +25
7-31, sell 122.20, -30, -30, -30
closed trades thru 7-31: -45

aud/usd
7/2, sell 1.0223, -5, -5, -5
7-5, sell 1.0258, -15, -15, -15
7-6, sell 1.0240, +40, +40, +40
7-9, sell 1.0181, +5, +5, +5
7-10, buy 1.0213, -15, -15, -15
7-11, buy 1.0244, +30, +5, +5
7-12, sell 1.0177, +25, +50, +25
7-16, sell 1.0218, -10, -10, -10
7-17, buy 1.0259, +40, +15, +15
7-18, buy 1.0319, +30, +80, +80
7-19, buy 1.0373, +25, +25, +25
7-23, sell 1.0323, +45, +45, +20
7-24, sell 1.0241, +40, +15, +15
7-25, sell 1.0208, be, be, be
7-26, buy 1.0336, +35, +85, +85
7-30, buy 1.0493, +5, +5, +5
7-31, sell 1.0474, -25, -25, -25
closed trades thru 7-31: +800

eur/usd
7/2, sell 1.2638, -15, -15, -15
7-5, sell 1.2506, +30, +105, +230
7-9, buy 1.2290, -15, -15, -15
7-10, buy 1.2324, -25, -25, -25
7-11, sell 1.2233, +30, +30, +5
7-12, sell 1.2211, +35, +10, +10
7-13, sell 1.2165, -10, -10, -10
7-16, sell 1.2233, +30, +30, +30
7-17, buy 1.2289, -40, -40, -40
7-19, buy 1.2306, -30, -30, -30
7-20, sell 1.2227, +25, +25, +25
7-23, sell 1.2104, be, be, be
7-24, sell 1.2065, -10, -10, -10
7-25, buy 1.2138, -15, -15, -15
7-26, buy 1.2170, +30, +105, +80
7-30, sell 1.2285, +35, +35, +35
7-31, buy 1.2330, -30, -30, -30
closed trades thru 7-31: +400

gbp/usd
7-2, sell 1.5660, -15, -15, -15
7-5, sell 1.5571, +45, +45, +95
7-6, sell 1.5497, be, be, be
7-9, buy 1.5497, -5, -5, -5
7-10, buy 1.5534, -35, -35, -35
7-11, buy 1.5548, +25, be, be
7-12, sell 1.5483, +30, +10, +10
7-13, buy 1.5516, +30, +30, +30
7-16, sell 1.5565, +40, +15, +15
7-17, buy 1.5654, -5, -5, -5
7-19, buy 1.5668, -20, -20, -20
7-23, sell 1.5588, +35, +60, +35
7-25, sell 1.5484, -15, -15, -15
7-26, buy 1.5551, +25, +125, +150
7-30, sell 1.5712, -10, -10, -10
7-31, sell 1.5623, -30, -30, -30
closed trades thru 7-31: +445

portfolio total for july: +1,600

I ran the Londonbreak EA on a backtest simulation for July 2012 for the same pairs pipwoof reported in post #331. Results are obviously different, but look promising (detailed results can be found by clicking on the links below). Backtest simulations give results in actual money, so the pip values below are estimated using the lot size (the EA by default trades 0.01 lots):

GBP/JPY
pipwoof says -45 pips
Londonbreak EA says -798 pips

AUD/USD
pipwoof says +800 pips
Londonbreak EA says +787 pips

EUR/USD
pipwoof says +400 pips
Londonbreak EA says +1051 pips

GBP/USD
pipwoof says +445 pips
Londonbreak EA says +58 pips

Total
pipwoof says +1600 pips
Londonbreak EA says +1098 pips

[B][/B] let us prepare ourselves for the inevitable. we will have losses. with the exception of the claims made by some spread trading and martingale methods, any trading will have losses. my understanding of the math for spread and martingale is that those may work for a period of time, but have ultimate doom as part of the program. could be wrong, open to learn, just sayin’ that vegas isn’t going to let some guy with a roulette system go home with any money. consumate mathematicians, those folks.

db/tt had losses during the eighteen month +july eye/hand backtest. some were serious and scary. here are some points i have come across in studying our losses:

  1. as much as these markets seem to move together, past data indicates they don’t as much as we might think. periods of losing do not correlate well. while g/j was busy giving up pips in early january '11, a/u was putting them back in and waited toward the end of the month to take losses. same thing with e/u losing early in june '11 while g/u made up for it until the 27th thru 30th.

  2. data from the original four-pair portfolio show one losing month overall, where several pairs indeed decided to give 'em up together. that was february of this year when we saw g/j +915, a/u -620, e/u -210, and g/u -530, net -445. we do note that, had e/j been included in our portfolio, february results would have been positive.

  3. looking at losses in a row can give us important information about how much pain we might have to endure and help us decide if we are up for it. in the test period +july:
    g/j had 4 losses in a row 5 times and 5 losses in a row 4 times.
    a/u had 4 losses in a row 2 times and 5 losses in a row 2 times.
    e/u had 4 losses in a row 4 times, 5 losses in a row 3 times, and 6 losses in a row 1 time.
    g/u had 4 losses in a row 2 times and 5 losses in a row 4 times.
    e/j had 4 losses in a row 2 times and 5 losses in a row 4 times.

strings of losses can certainly try our patience and it is definitely disturbing when the pairs get together on those strings. but, if we have some confidence in our projection to win based on what happened in the past, then we must also have confidence that our losing will resemble that same history. if everything changes, we are sol anyway.

pipwoof I took a look at the above results. Please take a look at the above quoted lines. My understanding is that the strategy as written calls for the initial stop loss to be placed at least -25 pips but max. -50 pips away from the entry price. So, if we have a trade showing the same three numbers of pips lost it should mean - because of the “jumping” SLs - that all three positions were stopped out at the initial stop loss. In that case however losses lower than -25 pips are impossible.

Just a random example:

7-9, buy 1.5497, -5, -5, -5

Entry price is 1.5497, therefore our initial stop loss should be 1.5450 (giving us a -47 pips stop loss; SL of 1.5475 is “not enough” because it would give us “only” -22 pips of stop loss), so this trade should have a result of -47 / -47 / -47 by strict strategy rules. So this -5 / -5 / -5? How come? Was it maybe a judgement called trade?

rpotor, your observation is correct. any time you see the same loss for all three positions across a pair and it is less than -25, it would have been a judgment call. you will see more of these on mondays and fridays than other days, but they do occur on other days. i have confessed to being especially jumpy on those days that begin and end the week and am willing to lose the possibility of a satisfying move to run quickly for the exit.

i have assumed that most experienced traders could see the logic in at least most of my judgment calls and end up in agreement. but, let’s take a look at a few of these and see what you think.

gbp/jpy, july 11, i jumped out with a -5 each position. this was not a monday or friday, but, in previous discussions of discretion, i have also mentioned the situation where there is a strong runup into positive territory followed by a fairly immediate failure. in this case, we entered long at 123.56 on the first of what turned out to be two strong up bars reaching a high of 123.97. so, here we are +40 in profits, but 3 pips short of being able to claim profit with one and protect the other two. and we find ourselves in this situation merely because of the quarter structure of the system. there are just times when judgment has to override that. we simply don’t want +40 to turn into -30 by letting it slide all the way back to 123.25, which would be the logical conclusion of a strict application of the stop loss rules. after the high, we see an immediate and strong down bar reaching below 123.75 to a low of 123.66. at that low, we have now watched our lovely +40 turn into a +10. it manages to rise back above 123.75, but only for a moment and starts to fall again. at this, i’ve had enough of july 11 and pull the plug -25 early at 123.50, -5.

gpy/jpy, july 19, jumped at -20. look at our short entry in the midst of 4 or 5 strong down bars followed immediately by strong up bar, doji, strong up bar. run! out at the next available quarter, 123.25, licking a -20 wound instead of the -45 that would have been required by strict application of the rules.

7-2, several pairs exited early. monday. be jumpy, be schizy, be trigger-happy. from my observations, mondays and fridays will either move steadily in a direction, making us pips, or trampoline around all over the place to drive every kind of trader bonkers. get out early and wait for another day.

most of the others will also be monday, friday, or runup followed by failure to reach first target days. regarding these judgment calls, i know they are a programming nightmare and i’m not even sure they can or should be quantified. it might work to move stops to be after a profit level is achieved, say, +20. in any case, i think it is fair to offer to both you and robopip that if you want to program for testing, just stick with the fixed rules of the method. i suppose it should still be profitable and not rely entirely on the judgment calls.

i said earlier that i believe most experienced traders would see the logic in my discretionary decisions, but not necessarily. that’s why we call them judgment calls. my judgment may not be your judgment. we have a lot of knoweldgeable and experienced traders following this thread. i would like to call on some of you to comment on this matter. when you see those early exits against the rules, would you have done the same or similar? i will appreciate your thoughts.

i do believe an important separation occurs between the gambler, i.e., “i’m gonna give it room, i sure would like for it to come back,” and the probability trader who cuts losses quickly. sometimes more quickly than one of his/her favorite methods calls for.

rpotor, you are doing great work and making a terrific contribution to the thread. not only in your efforts to program, but in your eye for detail and sensible challenges to the method. it is a pleasure to respond, so keep coming. thanks.

Okay, I hear you pipwoof. :slight_smile: That explains the numbers I’ve flagged. :slight_smile: Unfortunately you’re also right in that these judgement calls simply cannot be programmed into any EA, because they just require a human sitting in front of the screen. :slight_smile: A human trader might say “okay, I’m jumping out now, at 5 pips profit” for one trade and “I’m jumping out at 18 pips on this trade”. You can’t program this into the EA, because an EA is by its very nature kind of robotic :slight_smile: You can’t say in code something like “look EA, this is the rule, but sometimes it isn’t”. :slight_smile:

Anyway, your explanation was exactly the one I thought, when I wrote my post, however it’s good to see it stated in your words, so if anyone comes here and reads the topic, he/she will be aware that this is a limitation in the EA, which cannot be “solved”.

also appreciate your good work here. i now have a limited study on gbp/jpy only, jan '12 thru july '12, comparing original placement of entry stops at gmt 00 with placement at the london open, 7:00. results obtained by hand, so the usual caveats apply. to get these numbers for the london open alternative, i defined “day” as the entire previous day plus the hours 00 thru 6:00. if the low at 6:00 was lower than any previous bar of the past 30, it became the low of the day. since we had additional data for monday trades, i did not require the +/- 11, but entered at the +/- 1. i also gave the london the same discretionary calls i gave the original. when there was a marked disparity, like in march, i double or triple checked. if you have an interest in this decision, you should check also.

list below shows month, results of london open entries, and results of gmt 00 entries:
1, +880, +150
2, +590, +460
3, +330, +1410
4, +830, +1105
5, +515, +690
6, -190, +365
7, +5, -45
totals, +2960, +4135

a close look can tell us a lot about what’s going on here. the london often helps us stay out of an unwanted trade. especially when prices for the day are closing close to the extreme high or low for the day, we sometimes see that frustrating business where the move continues for two or three bars into the next day, triggering our entry, then gives it up and turns the other way. waiting for the london open steers us out of those first six hour bars and keeps us out of those particular unpleasant trades. an alternative would be to postpone entries, especially additional entries, until the continuation has proved itself, at least to some degree.

that seems to be the major strength of the london open variation. the biggest weakness is missing a move that occurs between 00 and 6:00 and that seems to happen often enough to outweigh the benefits of the bad trades not taken. i might conclude that there is some advantage to entering the market at sleepy time and being poised to catch a move quickly when it starts.

looking at more detail on some of the march trades:

3-2, gmt 00 enters at first bar of open and manages to get in early enough to tp at 130.00, +40, +15, +15. london gets a later start and gets caught entering just below a quarter, resulting in -25, -25, -25.

3-5, gmt 00 sells at 129.04 at 4:00 and catches the move, +25, +50, be. london is late, misses the 50 pip move between 00 and 06, and ends up stopped out, -10, -10, -10.

3-15, gmt enters long on opening bar and loses -45 X 3 = -135. by london open, prices have moved back below gmt 00 entry point and london does not enter at all this day. advantage london.

without doubt, this is a limited study on one pair and is far from convincing, but i am not encouraged enough to continue. unless we get something more promising, i prefer to leave the gmt 00 as the standard, at least for reporting results. we can leave other entry times in the discretion column and will appreciate hearing results obtained.

following five pairs, we currently have three entries:
g/j sell 122.62, currently printing just below 122.50. it is monday, stops to 122.50, risking -15 X 3 = -45.
a/u, no entry
e/u, no entry
g/u, sell 1.5617, stop loss at 1.5650, risking -35 X 3 = -105.
e/j, sell 97.12, stop loss at 97.50, risking -40 X 3 = -120.

Our data must be far apart. I had a buy @ 123.164 on g/j that stopped out at 122.750 already. Also, a buy on e/u @ 1.24108 that went b.e. on a judgment call.

Did you base solely on Sunday day for todays highs and lows?

My low for Sunday shows 122.473 g/j

Today’s entry rates based on 21.00 GMT day close

Pair/Buy Stop/Sell stop

  1. GJ/123.05/121.06
  2. EJ/97.41/95.01
  3. AU/1.0572/1.0445
  4. GU/1.5658/1.5502
  5. EU/1.2393/1.2164

Orders triggered so far,

  1. GJ Long (Hit SL, -30,-30,-30)
  2. EJ Long (TP hit, +34, +9,+9)
  3. AU Long (Open)
  4. GU Long (SL hit -33,-33,-33)
  5. EU LOng (TP hit +32,+7,+7)

Open Air position of EJ from 3rd August stopped out @ 97.50 giving +51 pips. Retrace is still open and locked +1 pips

Total will be updated in the evening