stevehopwoodforex.com
https://www.stevehopwoodforex.com/phpBB3/
Print view

GU H1 high/low entry system?
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=4702
Page 1 of 9
Author:  themaxx [ Thu May 05, 2016 5:00 pm ]
Post subject:  GU H1 high/low entry system?

I'm hoping someone can help code the system I'm trading. It has fixed rule based entries, but discretionary exits. I know its a big ask and it's probably not of interest to the majority of coders, but you might choose to help me for one the following reasons:
  • 1. I've been fiddling with various systems for around 7 years, and this is the first one that I've found to be profitable (if you're struggling as a trader please trade them on demo for a few months to see if they fit with your personality)
    2. The rules are simple (see below)
    3. I've shared my forex knowledge freely over the last 7 years, and have tried to help where possible
The system is based on a trading philosophy found in this thread:
http://www.forexfactory.com/showthread.php?t=555261

If you want to get an idea how the creator (60minuteman) trades, check out the youtube videos in the thread. He thinks about trading unlike anyone else that I've met. Note that he uses different rules to me, but the idea is basically: buy when the market makes a new low, sell when the market makes a new high, and wait for price to breakout, which should hopefully cover the costs of establishing your positions.

Rules are as follows:
1. I trade GBP/USD H1 and I ignore all the bars in the Asian session.
2. At 8:01 London time, I enter 1 pending buy and and 1 pending sell order straddling the candle that opens at 7am London and closes at 8am London - for the pending long, the trigger is 3 pips above the previous bar, stop is 3 pips below the previous bar, the for pending short the rules are reversed (note that it's 8am London, not 8am GMT or broker time).
3. At 9:01am, either:
(a) both have triggered and I am hedged holding the high and low of the day;
(b) the sell has triggered, and I move my buy pending order above the lowest candle of the day (or vice versa); or
(c) neither have triggered and I do nothing.
4. Then on the hour until 9pm, I continue move the untriggered pending order as follows:
(a) if the buy is untriggered, I cancel the buy pending and move it above the lowest candle for the day (3 pips above/below the previous candle); or
(b) is the sell is untriggered, I cancel the sell pending and I move it below the highest candle for the day.
5. I keep doing this until a trade is triggered and I have secured both a high and low of the day.
6. If a trade is stopped out, I re-enter by looking to sell the high, buy the low. Maximum 1 long and 1 short open during a daily period. If I hold trades open over until the next day, those trades don't count towards the maximum trades for the current day.
7. I always base my pending order on the highest or lowest candle. If I get a low candle, then a candle that opens & closes within the low candle, I don't move my pending order. This way I am guaranteed to always capture the high or low of the day.
8. After 9pm London time I don't enter any more trades. I leave any pending orders open to possibly be triggered overnight.
9. For trade management, I try to hold my trades until they are at least 100 pips, then depending on market movement/recent losses, I close winning trades. The EA should not close open trades.

That's it! I've attached some screenshots if anyone wants to see examples of my trades.

If anyone could help me on this it would be greatly appreciated. Currently I enter all my trades manually and I often make mistakes.

Thanks!

Pete

Edit by Steve:
The EA is in post 2.
Author:  SteveHopwood [ Thu May 05, 2016 5:03 pm ]
Post subject:  Code my H1 high/low entry system?

SERIOUS WARNING
  • Most Forex traders lose all their money.
  • Using the robot posted here in trading Forex does not guarantee success.
  • Trading this robot could lead to serious financial loss.
  • Trading this robot without understanding its underlying trading strategies guarantees traders will lose their money.
  • This is not a set-and-forget ea; there is no such thing and anyone who tries to claim there is, is either stupid or lying. This ea requires frequent manual intervention.
  • At best, a trading robot is only 90% as good as the manual strategy it trades. At best. At worst, it can be much less effective. If the strategy is rubbish, so is the robot.
  • To trade this robot, you have to understand:
    • How to use EA's.
MAKE SURE YOU READ THIS POST http://www.stevehopwoodforex.com/phpBB3 ... 41#p111241 There was a Forex bloodbath on Jan 15th 2015 that you need to know about.

Here is the EA.
HiLoBufferPips is added/subtracted to/from the hilo of the relevant candle to calculate the order price.
StopLossPips is added/subtracted to/from the hilo of the relevant candle to calculate the stop loss.

Usual Bob stuff
It is all there - the moving average, scc, slope etc, just hidden from view and disabled by default. It is easy to enable anything by going into the source code and changing the inputs yourselves - I describe how at http://www.stevehopwoodforex.com/phpBB3 ... 07#p132307

Alternatively, if you want the inputs displayed in the inputs window, merely insert 'extern ' to the left of the input.

There is a line that you will need to comment out should you wish to enable the management features, so do a search for this line of code:

Code: Select all

if (OrderOpenTime() < iTime(Symbol(), PERIOD_D1, 0)) continue;//Only interested in today's trades. This needs refining.
and comment it out with the '//' symbol:

Code: Select all

//if (OrderOpenTime() < iTime(Symbol(), PERIOD_D1, 0)) continue;//Only interested in today's trades. This needs refining.
This line of code prevents PH from including open trades from previous days being considered for any of the management functions.

Also included but hidden is the whole panoply of grid trading, hedging and offsetting that we have been developing here lately.


Thanks to the generosity of those of you who have sent me some dosh. I will reply individually - I reckoned that you would prefer I get on with the bot.

Let the testing begin.

:xm:

---------------------------------------------------------------------------------
Edit 16th May 2016
'Pip Hunter plus everything else' has all the usual Bob stuff enabled, along with grid trading, hedging and offsetting.

I have recently coded a paid-for EA that one of our members is willing to share here once we have the bugs ironed out. This member had to endure a withering barrage of scorn from me because the ludicrous Crap Custom Abortion that generates the trading direction begins with, "NonLag" - as if by some miracle of warpy-timey-wimey-spacey stuff, a lagging indicator becomes non-lagging just because some cretin puts "NonLag" in front of the CCA name. This EA is generating pips on the GJ M5 - not because of the ludicrous CCA but because of offsetting.

Early days, but it begins to look as though offsetting/hedging might be the missing link in so many chains. I am starting to think that the trading system being used offers the opportunity for a slam-dunk when the market moves in favour of the initial trade signal, then profitable get-out when the market moves in the wrong direction.

We shall see.
---------------------------------------------------------------------------------

Matters of general interest
Go here to download and run the script that will fill your platform's missing chart history: http://www.stevehopwoodforex.com/phpBB3 ... f=15&t=254
Read this post:
http://www.stevehopwoodforex.com/phpBB3 ... p?f=6&t=78 Newbie traders, read this for inspiration and warning. Those of you who have suffered losses, read it for inspiration.

Masterly summary of hedging: http://www.forexfactory.com/showthread. ... ost4977179

EA coding
I receive may requests to code EA's. Traders, if I code your EA for free, then I will share it here. If you want me to code your EA without sharing, then my fee is $100 payable into my paypal account. I explain why at http://www.stevehopwoodforex.com/phpBB3 ... ?f=15&t=79, at the bottom of the post.

Useful utilities/EA's/scripts -

-
Author:  RedLineFred [ Fri May 06, 2016 2:43 am ]
Post subject:  Code my H1 high/low entry system?

Hi Pete,

Simple system.

I too have watched Darren and as you say he has some interesting ideas. Did you know he's also involved in a Podcast? http://2traderspodcast.com/

With respect to your rules, are you stuck on pending orders? I understand why you use them manually, but do you want the EA to also use pending orders?

To fully automate you might need to consider trade exits, any thoughts on this?

Have you tried any other pairs?

cheers
Fred
Author:  themaxx [ Fri May 06, 2016 6:53 am ]
Post subject:  Code my H1 high/low entry system?

RedLineFred » Fri May 06, 2016 2:43 am wrote:Hi Pete,

Simple system.

I too have watched Darren and as you say he has some interesting ideas. Did you know he's also involved in a Podcast? http://2traderspodcast.com/
Yes, I've listened to every episode, some of them twice! I get a new idea every time I listen.
RedLineFred » Fri May 06, 2016 2:43 am wrote:
With respect to your rules, are you stuck on pending orders? I understand why you use them manually, but do you want the EA to also use pending orders?
I haven't really thought about this. I guess the EA could do instant orders instead of pending, but I would prefer pending so if my VPS goes down there's less chance of missing a trade. Also, it would be easier for me to monitor whats going on, to see where the EA is entering and what the market is doing.
RedLineFred » Fri May 06, 2016 2:43 am wrote: To fully automate you might need to consider trade exits, any thoughts on this?
If you wanted to fully automate I think a 100 /150 pip fixed take profit would do well. If you listen to Darren his philosophy is the entries do not matter, and that random entries are OK (but you do need to enter!, and I prefer mechanical non-discretionary rules to give me an entry). The skill is in when to decide to exit - have you had a string of losses? Are you 3 orders long? Maybe you want to take one or two longs off. Does the pair look over extended? Maybe it's due to retrace. I would prefer not to automate this.
RedLineFred » Fri May 06, 2016 2:43 am wrote:
Have you tried any other pairs?

cheers
Fred
Yes, I've just added USD/CAD (which is why I wanted a EA) on Monday. I halved my GBP/USD position size. Caught some good moves on CAD on Tuesday and Wednesday.
Author:  RedLineFred [ Fri May 06, 2016 8:48 am ]
Post subject:  Code my H1 high/low entry system?

I have been working through your description and i am a little confused as to where you place your pending orders.

Looking at longs you say:

2. At 8:01 London time, I enter 1 pending buy ..... for the pending long, the trigger is 3 pips above the previous bar

4. (a) if the buy is untriggered, I cancel the buy pending and move it above the lowest candle for the day

6. If a trade is stopped out, I re-enter by looking to sell the high, buy the low.

7. I always base my pending order on the highest or lowest candle. If I get a low candle, then a candle that opens & closes within the low candle, I don't move my pending order. This way I am guaranteed to always capture the high or low of the day.

Maybe you could clarify where you place the orders.

Are you looking to buy the high or buy the low of the day?
Author:  themaxx [ Fri May 06, 2016 5:21 pm ]
Post subject:  Code my H1 high/low entry system?

RedLineFred » Fri May 06, 2016 8:48 am wrote:Are you looking to buy the high or buy the low of the day?
I'm looking to buy the low of the day, and sell the high of the day.

Look at this picture and the USDCAD from Tuesday 3 May and Wednesday 4 May:
lQmI6p6.png
If you start at the bar right at the grey box that says 76 pips, this is the candle that starts at 7am, and ends at 8am.
  • Enter a pending long above this bar, so if price shoots up and doesn't retrace, I have caught a long move. Enter a pending short above below this bar, so if price shoots down and doesn't retrace, I have caught the short move.
    Next candle, I'm triggered short. This candle is lower than the previous candle, so it is the low of the day. I move my pending buy 3 pips above this low of the day candle.
    Next candle I'm triggered long. I have the long and short (hedged), so I do nothing until one trade is stopped out.
    Next candle, my short from the open is stopped out.
    The following candle, I enter a pending short based on the previous candle as we have a new high of the day.
    We get green candles for the rest of the day. I kept moving my pending short higher as each candle made a new high of the day.
    When we got to the red candle I closed out my long and called it a day. This was my manual decision and is why I don't want to automate exits. As price rarely moves at the end of the day I decided not to enter new trades at this point, and to take the day off.
For Wednesday 4 May:
  • Entered pending long/shorts above the 7am candle.
    Triggered short. Again, after this candle closed I moved my pending long above it as it was the new low of the day.
    Short stopped out, so I moved my pending short below each highest candle of the day. You can see a tiny doji - below that I was triggered short again - hedged.
    That short was stopped out, so again I started entering shorts below each highest candle of the day. Again it got to the evening, and I shut everything down.
Does that make sense?
Author:  milanese [ Fri May 06, 2016 5:53 pm ]
Post subject:  Code my H1 high/low entry system?

@themaxx please load your images always as attachment to your posts up, as we don't like any type of link outside..
I have your post corrected.
Cheers :)

Tommaso
Author:  RedLineFred [ Mon May 09, 2016 2:22 am ]
Post subject:  Code my H1 high/low entry system?

OK I see your thinking now.

The only remaining question is how to integrate your manual discretionary approach. For exits its easy, just don't have any auto exits and rely on manual intervention. But an auto exit would allow you to gauge the performance better.

But you also pull the plug and stop looking for new trades toward the end of the day - any chance to get a set of rules for this? Maybe time based, no trades after Noon NY? or something that uses the daily ATR?
Author:  themaxx [ Mon May 09, 2016 6:31 am ]
Post subject:  Code my H1 high/low entry system?

RedLineFred » Mon May 09, 2016 2:22 am wrote:OK I see your thinking now.

The only remaining question is how to integrate your manual discretionary approach. For exits its easy, just don't have any auto exits and rely on manual intervention. But an auto exit would allow you to gauge the performance better.

But you also pull the plug and stop looking for new trades toward the end of the day - any chance to get a set of rules for this? Maybe time based, no trades after Noon NY? or something that uses the daily ATR?
Yes, last trade is at 9pm, so I can get some sleep. Pair choice is completely discretionary, but you want a pair that moves a lot when you're awake and not much when you're asleep. I don't want to be managing pairs overnight, so these pairs have been chosen because they don't move much overnight (from my perspective).

You have to be awake for the movement of the pair as:
1. If price moves up and down, this system makes money.
2. If price doesn't move, this system bleeds money.

Especially on the GBP, you usually see either:
1. a big move in one direction in the London session, then a continuation in the NY session; or
2. a big move in one direction in the London session, then a retrace in the NY session.

That's what this system is trying to take advantage of.
Author:  themaxx [ Tue May 10, 2016 6:30 am ]
Post subject:  Code my H1 high/low entry system?

SteveHopwood » Mon May 09, 2016 9:49 pm wrote:I see some discussion about the trading system here, which is great.

Thingy is though, I see nothing to attract the attention of serious coders here.

SHF has moved a long way since its inception and it is no longer enough to announce that a member has an idea that 'might' be successful and so ask for someone to code an EA to test the theory.

These days, we coders demand that someone asking us to code an EA free of charge prove by their results trading live on a serious cash account, that the person has been profitable. Most of us have done our we-will-code-anything-that-moves time, have learned discrimination and are not willing to code any old thingy.

So, you want a coder here? Attract us with serious cash profits.

:xm:
Fair enough Steve, the coders here are busy and their time needs to be allocated efficiently.

I have been trading this live for a couple of months - it's a very small account so I can't show a "serious cash account". I have been profitable, but this system is completely discretionary in it's exits, the results are not objective or the same for everyone - ie if I make a mistake (which I did mid last week), the results suffer.

I've just realised after thinking about the issue after reading your post, that anyone who codes this will be helping me, and they won't be helping themselves (unless they want to spend a substantial amount of time trading this new way, manually managing their exits). So if that's the case maybe I should be asking people to code it for a fee? I don't know what the protocol is surrounding this issue.
All times are UTC Page 1 of 9