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 3 of 9
Author:  porseguro [ Wed May 11, 2016 10:56 am ]
Post subject:  Code my H1 high/low entry system?

patmontes » Tue May 10, 2016 5:24 pm wrote:I'll be happy to fork out $20 to add TNAVI MA filters to the EA Steve will code. Enter trades only when at 8am candle the MA filters show a trend, else stay out for the day. :youknow:
I'll put $30
Author:  themaxx [ Wed May 11, 2016 11:52 am ]
Post subject:  Code my H1 high/low entry system?

SteveHopwood » Wed May 11, 2016 8:41 am wrote: Would you like to send me a spec and I will knock something together?

:xm:
Steve - could you please PM me your paypal or bank account details? i'm based in the UK and can do a normal bank transfer if easier. Paypal is fine too.

Spec is as follows. Please don't start working on this until others in this thread have reviewed and confirm that I haven't missed anything. I've simplified it down so much I'm sure I've forgotten something.

Spec for H1 high/low entry system
Background: This breakout system is designed to trade when the GBP/USD is most active – ie during the London and New York sessions. During the Asian sessions, no trades are taken as the range is usually quite small. I have been trading this manually while working full time, so to fit this schedule I use pending orders which I only need to enter once per hour during London and New York. From a programming perspective if not too difficult I would like to maintain this as the VPS only needs to be up for 1 minute per hour, and if it goes down it is easy for me to manage trades on my phone.
The entries are to designed initially to catch a breakout on the open, then buy the low of the day, sell the high of the day. There are lots of losses in capturing the high or low (30% win rate), and the exits (currently discretionary, but for programming purposes will be a fixed TP) need to be big to cover these losses. If price ranges, there is drawdown. If price makes big moves, this system makes money.

Long trades
The rules for longs are the same as for shorts but to be clear I’ll separate out the long and short trades. First trade is at 8:01 London time, not adjusted for daylight savings, ie any time of the year whenever London traders get to work, that’s went it starts.
  • 1. At 8:01 London time, enter a pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle. Take profit 150 pips. All pending orders below should be 150 pip take profit. From a psychological perspective I pretend the Asian session do not exist.
    2. At 1 minute past the hour, conduct the following check:
    • a. if the long is triggered and stopped out or closed out (ie pending long order and open long order do not exist), enter a pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle.
      b. if the long is triggered and not stopped out, do nothing. The EA only enters trades/amends pending orders based on the current day’s trades, and only has 1 maximum long per day.
      c. if the long is not triggered:
      i. if the previous candle forms a low lower than the 2nd previous candle, that is the new low of the day, so cancel the pending long and enter a new pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle.
      ii. if the previous candle does not form a low lower than the 2nd previous candle (ie previous candle is an inside bar), do nothing.
    3. At 22:01 London time, do not trade. The last trade that could be entered was at 21:01. Do nothing until the next day. The following day, do not manage the previous days’ trades.
CONTROVERSIAL: Each trade has a fixed lot size, not a % based on stop loss size. This is because trades with bigger stop losses are less likely to be hit, so the greater potential loss is balanced out by the lower probability of taking the loss (you can backtest this and see that it makes sense).

TNAVI MA: It appears that there’s consensus that the TNAVI MA filters should be added – if this is not too much trouble please add, but I will not be using it in my trading.

Short trades
The rules for shorts are the same as for longs, but reversed.
  • 1. At 8:01 London time, enter a pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle. Take profit 150 pips.
    2. At 1 minute past the hour, conduct the following check:
    • a. if the short is triggered and stopped out or closed out (ie pending short order and open short order do not exist), enter a pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle.
      b. if the short is triggered and not stopped out, do nothing.
      c. if the short is not triggered:
      i. if the previous candle forms a high higher than the 2nd previous candle, that is the new high of the day, so cancel the pending short and enter a new pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle.
      ii. if the previous candle does not form a high higher than the 2nd previous candle (ie previous candle is an inside bar), do nothing.
    3. At 22:01 London time, do not trade. The last trade that could be entered was at 21:01. Do nothing until the next day. The following day, do not manage the previous days’ trades.

Visual Examples
20160315GBPUSDH1v2.png

14 March
8. Enter PO short, PO long.
9. PO short triggered, PO long adjusted as (8) was lower than (7)
10. Short stopped out. PO short entered.
11. Do nothing – as both long short
12. Do nothing
13. Do nothing – long stopped out.
14. Long stopped out, enter PO long based on previous bar.
15. Do nothing.
16. (15) was a lower low, so delete PO and re-enter PO long based on (15).
17. (16) was a lower low, so delete PO and re-enter PO long based on (16).
18. Do nothing
19. (18) was a lower low, so delete PO and re-enter PO long based on (18).
20. Do nothing
21. Do nothing
22. Stop trading

15 March
8. Enter PO short, PO long.
9. Short triggered. PO long adjusted as (8) was lower than (7).
10. PO long adjusted as (9) was lower than (8)
11. PO long adjusted as (10) was lower than (9)
12. Do nothing. PO long was triggered. Manual take profit.
13. No short in place, treat (12) as if first candle of the day, PO short.
14. Do nothing
15. Do nothing
16. Do nothing. Long stopped out.
17. Enter long PO based on (16)
18. Do nothing
19. Do nothing
20. Do nothing
21. Do nothing
22. Stop trading.
Author:  themaxx [ Wed May 11, 2016 11:53 am ]
Post subject:  Code my H1 high/low entry system?

patmontes » Tue May 10, 2016 5:24 pm wrote:I'll be happy to fork out $20 to add TNAVI MA filters to the EA Steve will code. Enter trades only when at 8am candle the MA filters show a trend, else stay out for the day. :youknow:
porseguro » Wed May 11, 2016 10:56 am wrote:
patmontes » Tue May 10, 2016 5:24 pm wrote:I'll be happy to fork out $20 to add TNAVI MA filters to the EA Steve will code. Enter trades only when at 8am candle the MA filters show a trend, else stay out for the day. :youknow:
I'll put $30
Excellent guys! If Steve adds this to the EA please paypal this amount to him directly.
Author:  themaxx [ Wed May 11, 2016 11:55 am ]
Post subject:  Code my H1 high/low entry system?

patmontes » Wed May 11, 2016 10:04 am wrote:Themaxx, by the way, do you move also the SL of the previously triggered trade along when moving the pending buy/sell stop order with each candle?
Yes, that's correct. Take a look at my spec here:themaxx » Wed May 11, 2016 11:52 am, I think it's much clearer. Please tell me if it's not.
Author:  porseguro [ Wed May 11, 2016 4:39 pm ]
Post subject:  Code my H1 high/low entry system?

themaxx » Wed May 11, 2016 11:53 am wrote:
patmontes » Tue May 10, 2016 5:24 pm wrote:I'll be happy to fork out $20 to add TNAVI MA filters to the EA Steve will code. Enter trades only when at 8am candle the MA filters show a trend, else stay out for the day. :youknow:
porseguro » Wed May 11, 2016 10:56 am wrote:
patmontes » Tue May 10, 2016 5:24 pm wrote:I'll be happy to fork out $20 to add TNAVI MA filters to the EA Steve will code. Enter trades only when at 8am candle the MA filters show a trend, else stay out for the day. :youknow:
I'll put $30
Excellent guys! If Steve adds this to the EA please paypal this amount to him directly.
Can't get into my paypal account, they told me to reset my rooter and I'll be able too in 24 hours. :arrrg:
Author:  themaxx [ Thu May 12, 2016 9:58 am ]
Post subject:  Code my H1 high/low entry system?

Does anyone have comments on the spec below please? Is it all clear? Did I miss anything? I'd like to knock this off in one go.
themaxx » Wed May 11, 2016 11:52 am wrote:
Steve - could you please PM me your paypal or bank account details? i'm based in the UK and can do a normal bank transfer if easier. Paypal is fine too.

Spec is as follows. Please don't start working on this until others in this thread have reviewed and confirm that I haven't missed anything. I've simplified it down so much I'm sure I've forgotten something.

Spec for H1 high/low entry system
Background: This breakout system is designed to trade when the GBP/USD is most active – ie during the London and New York sessions. During the Asian sessions, no trades are taken as the range is usually quite small. I have been trading this manually while working full time, so to fit this schedule I use pending orders which I only need to enter once per hour during London and New York. From a programming perspective if not too difficult I would like to maintain this as the VPS only needs to be up for 1 minute per hour, and if it goes down it is easy for me to manage trades on my phone.
The entries are to designed initially to catch a breakout on the open, then buy the low of the day, sell the high of the day. There are lots of losses in capturing the high or low (30% win rate), and the exits (currently discretionary, but for programming purposes will be a fixed TP) need to be big to cover these losses. If price ranges, there is drawdown. If price makes big moves, this system makes money.

Long trades
The rules for longs are the same as for shorts but to be clear I’ll separate out the long and short trades. First trade is at 8:01 London time, not adjusted for daylight savings, ie any time of the year whenever London traders get to work, that’s went it starts.
  • 1. At 8:01 London time, enter a pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle. Take profit 150 pips. All pending orders below should be 150 pip take profit. From a psychological perspective I pretend the Asian session do not exist.
    2. At 1 minute past the hour, conduct the following check:
    • a. if the long is triggered and stopped out or closed out (ie pending long order and open long order do not exist), enter a pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle.
      b. if the long is triggered and not stopped out, do nothing. The EA only enters trades/amends pending orders based on the current day’s trades, and only has 1 maximum long per day.
      c. if the long is not triggered:
      i. if the previous candle forms a low lower than the 2nd previous candle, that is the new low of the day, so cancel the pending long and enter a new pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle.
      ii. if the previous candle does not form a low lower than the 2nd previous candle (ie previous candle is an inside bar), do nothing.
    3. At 22:01 London time, do not trade. The last trade that could be entered was at 21:01. Do nothing until the next day. The following day, do not manage the previous days’ trades.
CONTROVERSIAL: Each trade has a fixed lot size, not a % based on stop loss size. This is because trades with bigger stop losses are less likely to be hit, so the greater potential loss is balanced out by the lower probability of taking the loss (you can backtest this and see that it makes sense).

TNAVI MA: It appears that there’s consensus that the TNAVI MA filters should be added – if this is not too much trouble please add, but I will not be using it in my trading.

Short trades
The rules for shorts are the same as for longs, but reversed.
  • 1. At 8:01 London time, enter a pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle. Take profit 150 pips.
    2. At 1 minute past the hour, conduct the following check:
    • a. if the short is triggered and stopped out or closed out (ie pending short order and open short order do not exist), enter a pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle.
      b. if the short is triggered and not stopped out, do nothing.
      c. if the short is not triggered:
      i. if the previous candle forms a high higher than the 2nd previous candle, that is the new high of the day, so cancel the pending short and enter a new pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle.
      ii. if the previous candle does not form a high higher than the 2nd previous candle (ie previous candle is an inside bar), do nothing.
    3. At 22:01 London time, do not trade. The last trade that could be entered was at 21:01. Do nothing until the next day. The following day, do not manage the previous days’ trades.

Visual Examples

14 March
8. Enter PO short, PO long.
9. PO short triggered, PO long adjusted as (8) was lower than (7)
10. Short stopped out. PO short entered.
11. Do nothing – as both long short
12. Do nothing
13. Do nothing – long stopped out.
14. Long stopped out, enter PO long based on previous bar.
15. Do nothing.
16. (15) was a lower low, so delete PO and re-enter PO long based on (15).
17. (16) was a lower low, so delete PO and re-enter PO long based on (16).
18. Do nothing
19. (18) was a lower low, so delete PO and re-enter PO long based on (18).
20. Do nothing
21. Do nothing
22. Stop trading

15 March
8. Enter PO short, PO long.
9. Short triggered. PO long adjusted as (8) was lower than (7).
10. PO long adjusted as (9) was lower than (8)
11. PO long adjusted as (10) was lower than (9)
12. Do nothing. PO long was triggered. Manual take profit.
13. No short in place, treat (12) as if first candle of the day, PO short.
14. Do nothing
15. Do nothing
16. Do nothing. Long stopped out.
17. Enter long PO based on (16)
18. Do nothing
19. Do nothing
20. Do nothing
21. Do nothing
22. Stop trading.
Author:  porseguro [ Fri May 13, 2016 9:06 am ]
Post subject:  Code my H1 high/low entry system?

porseguro » Wed May 11, 2016 4:39 pm wrote: Can't get into my paypal account, they told me to reset my rooter and I'll be able too in 24 hours. :arrrg:
Money sent
Author:  SteveHopwood [ Fri May 13, 2016 11:29 am ]
Post subject:  Code my H1 high/low entry system?

themaxx » Wed May 11, 2016 11:52 am wrote:
SteveHopwood » Wed May 11, 2016 8:41 am wrote: Would you like to send me a spec and I will knock something together?

:xm:
Steve - could you please PM me your paypal or bank account details? i'm based in the UK and can do a normal bank transfer if easier. Paypal is fine too.

Spec is as follows. Please don't start working on this until others in this thread have reviewed and confirm that I haven't missed anything. I've simplified it down so much I'm sure I've forgotten something.

Spec for H1 high/low entry system
Background: This breakout system is designed to trade when the GBP/USD is most active – ie during the London and New York sessions. During the Asian sessions, no trades are taken as the range is usually quite small. I have been trading this manually while working full time, so to fit this schedule I use pending orders which I only need to enter once per hour during London and New York. From a programming perspective if not too difficult I would like to maintain this as the VPS only needs to be up for 1 minute per hour, and if it goes down it is easy for me to manage trades on my phone.
The entries are to designed initially to catch a breakout on the open, then buy the low of the day, sell the high of the day. There are lots of losses in capturing the high or low (30% win rate), and the exits (currently discretionary, but for programming purposes will be a fixed TP) need to be big to cover these losses. If price ranges, there is drawdown. If price makes big moves, this system makes money.

Long trades
The rules for longs are the same as for shorts but to be clear I’ll separate out the long and short trades. First trade is at 8:01 London time, not adjusted for daylight savings, ie any time of the year whenever London traders get to work, that’s went it starts.
  • 1. At 8:01 London time, enter a pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle. Take profit 150 pips. All pending orders below should be 150 pip take profit. From a psychological perspective I pretend the Asian session do not exist.
    2. At 1 minute past the hour, conduct the following check:
    • a. if the long is triggered and stopped out or closed out (ie pending long order and open long order do not exist), enter a pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle.
      b. if the long is triggered and not stopped out, do nothing. The EA only enters trades/amends pending orders based on the current day’s trades, and only has 1 maximum long per day.
      c. if the long is not triggered:
      i. if the previous candle forms a low lower than the 2nd previous candle, that is the new low of the day, so cancel the pending long and enter a new pending long with a trigger at 3 pips above the previous candle, stop loss 3 pips below the previous candle.
      ii. if the previous candle does not form a low lower than the 2nd previous candle (ie previous candle is an inside bar), do nothing.
    3. At 22:01 London time, do not trade. The last trade that could be entered was at 21:01. Do nothing until the next day. The following day, do not manage the previous days’ trades.
CONTROVERSIAL: Each trade has a fixed lot size, not a % based on stop loss size. This is because trades with bigger stop losses are less likely to be hit, so the greater potential loss is balanced out by the lower probability of taking the loss (you can backtest this and see that it makes sense).

TNAVI MA: It appears that there’s consensus that the TNAVI MA filters should be added – if this is not too much trouble please add, but I will not be using it in my trading.

Short trades
The rules for shorts are the same as for longs, but reversed.
  • 1. At 8:01 London time, enter a pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle. Take profit 150 pips.
    2. At 1 minute past the hour, conduct the following check:
    • a. if the short is triggered and stopped out or closed out (ie pending short order and open short order do not exist), enter a pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle.
      b. if the short is triggered and not stopped out, do nothing.
      c. if the short is not triggered:
      i. if the previous candle forms a high higher than the 2nd previous candle, that is the new high of the day, so cancel the pending short and enter a new pending short with a trigger at 3 pips below the previous candle, stop loss 3 pips above the previous candle.
      ii. if the previous candle does not form a high higher than the 2nd previous candle (ie previous candle is an inside bar), do nothing.
    3. At 22:01 London time, do not trade. The last trade that could be entered was at 21:01. Do nothing until the next day. The following day, do not manage the previous days’ trades.

Visual Examples

14 March
8. Enter PO short, PO long.
9. PO short triggered, PO long adjusted as (8) was lower than (7)
10. Short stopped out. PO short entered.
11. Do nothing – as both long short
12. Do nothing
13. Do nothing – long stopped out.
14. Long stopped out, enter PO long based on previous bar.
15. Do nothing.
16. (15) was a lower low, so delete PO and re-enter PO long based on (15).
17. (16) was a lower low, so delete PO and re-enter PO long based on (16).
18. Do nothing
19. (18) was a lower low, so delete PO and re-enter PO long based on (18).
20. Do nothing
21. Do nothing
22. Stop trading

15 March
8. Enter PO short, PO long.
9. Short triggered. PO long adjusted as (8) was lower than (7).
10. PO long adjusted as (9) was lower than (8)
11. PO long adjusted as (10) was lower than (9)
12. Do nothing. PO long was triggered. Manual take profit.
13. No short in place, treat (12) as if first candle of the day, PO short.
14. Do nothing
15. Do nothing
16. Do nothing. Long stopped out.
17. Enter long PO based on (16)
18. Do nothing
19. Do nothing
20. Do nothing
21. Do nothing
22. Stop trading.
This is just the sort of spec a coder loves - clarity and brevity. :clap: :clap: :clap: I am starting this today.

:xm:
Author:  SteveHopwood [ Sat May 14, 2016 2:26 pm ]
Post subject:  GU H1 high/low entry system?

The EA is in post 2.

I have slightly renamed the thread and moved it into our Automation forum.

:xm:
Author:  SteveHopwood [ Sun May 15, 2016 3:15 pm ]
Post subject:  GU H1 high/low entry system?

V 1a is in post 1.

Master bloop spotter dydynamic spotted a mass of bloops :clap: :clap: :clap: :clap: that would have come to light as soon as anyone used tnavi's filter of enabled any of the others. In putting those right I spotted a few more as well that may have had some effect a little further down the line.

:xm:
All times are UTC Page 3 of 9