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

Coin-Flip EA v2.0
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3765
Page 16 of 19
Author:  acs [ Fri Aug 22, 2014 10:33 am ]
Post subject:  Coin-Flip EA v2.0

thanks for updated version, I will test over weekend and start using from sunday/monday

here is today's trade, should I take the money and run :smile:
ok we all know it's toy money but it is Friday after all and there is some
red flag news later today.
always remember just because it is run on a EA you still have choices, you
don't have to sit around watching your trade go negative for whatever reason

acs
Author:  zhengzuodong [ Fri Aug 22, 2014 3:13 pm ]
Post subject:  Coin-Flip EA v2.62

xmess7 » Fri Aug 22, 2014 3:42 pm wrote:Folks:
Attached is an update. This is an attempt to correct the discrepancy that acs saw when a trade is opened and closed.

The modification was to used hour count (0,1,2, .. 23) instead of time (xx:xx) to determine trade management. The rule that I interpret is from the original thread. That is that a trade is closed at open of TradeInOpenBarOffset and a new trade is opened at TradeInOpenBarOffset close

As an example:
London Open hr = 9 ( or 0900 UK time)
BrokerGMTOffset hr is 1 hr so then LondonOpen time in Broker hrs is 10 (9+1)
Say TradeInOpenBarOffset = 1. Then:
EA should close trade at open of LondonOpen time in Broker hr (10) + TradeInOpenBarOffset hr (1) = 11
EA then will open new trade at LondonOpen time in Broker hr (10) + TradeInOpenBarOffset hr (1) +1 = 12
or
Close trade at open of 11th hour
Open trade at open of 12th hour (which would be right after close of the 11th hour)

I will be forward testing to see if this change helped. ACS do your magic!!!
Questions/Comment.... bring them on

Peace

PS: As for interrupting the EA, based on the code it should not affect anything and the EA will pick up where it left off from.
Thank you for the great work. Jess
Author:  xmess7 [ Fri Aug 22, 2014 4:15 pm ]
Post subject:  Coin-Flip EA v2.0

Hey guys:
@acs I got the same result. Except my short was taken a little bit higher price than yours LOL. I see you are using v261. Notice that your trade was taken at the close of the LOTinBroker hr. I think it should be closing a trade at that moment. The trade should be opened at the end of that TradeInOpenBarOffset Hr. Which in your case would be at the open of 12th hr not the 11th.
CoinFlip262.jpg
The basic logic is that we close a trade at the open of the TradeInOpenBarOffset and open a new trade at the close of that same candle (or which is almost the same) at the open of the following candle.

Comments/questions/recommendations All are welcomed!
J
Author:  acs [ Sat Aug 23, 2014 6:37 pm ]
Post subject:  Coin-Flip EA v2.0

Hi Xmess7
thank you for your update and picture explaining the chart and while I know it may only be a example
are you saying your 10 am candle is London open candle if so we have a problem in that our charts are
out of synchronization because your London open is hours after my London open.
Author:  acs [ Sat Aug 23, 2014 10:04 pm ]
Post subject:  Coin-Flip EA v2.0

EA v262 .................
in the EA LondonOpen is 9.00 as opening time but ForexFactory shows it as 8.00 so I change it in the EA
to 8.00 as I have done from the start, perhaps this is upsetting things ?.
anyway after a little searching I found this list of times for London stock exchange that gives a little bit more information regarding the order of the day, perhaps this will help

I am aware we can set LondonOpenTime to what we want eg: to trade Tokyo or Frankfirt open or whatever but we must all be the same in the charts whatever our own times are, london open is london open and the candle should be more or less the same for us all.

as you can see in picture in last post TradeInOpenBarOffset = 2 works ok as in no errors as does
TradeInOpenBarOffset = 0 ..... But ! TradeInOpenBarOffset = 1 keeps giving a error and stops the EA
this offset =1 error could be a weekend thing so I will see how it goes on Sunday/Monday when market is open

London Opening times
Normal trading sessions on the main orderbook (SETS) are from 08:00 to 16:30 every day of the week except Saturdays, Sundays and holidays declared by the Exchange in advance. The detailed schedule is as follows:

Trade Reporting 07:15 - 07:50
Opening Auction 07:50 - 08:00
Continuous Trading 08:00 - 16:30
Closing Auction 16:30 - 16:35
Order Maintenance 16:35 - 17:00
Trade Reporting Only 17:00 - 17:15

here is a picture of offset = 0 trades .............................................
Author:  xmess7 [ Sun Aug 24, 2014 8:47 pm ]
Post subject:  Coin-Flip EA v2.0

@acs

Awesome answer dude... thnx alot.

Ok... we need to be clear with what the author meant for the london open and the trade approach From the thread. From this post http://www.forexfactory.com/showthread. ... ost7614364

London opening: 9:00 (London time, GMT)

1st Candle 9:00-10:00 (We don't trade here, it's the breakout)

2st Candle 10:00-11:00 (At the beginning of the candle we close the trade of yesterday)

At the end of the candle we open the new trade.

Buy if the candle is bullish
Sell if the candle is bearish

3th Candle 11:00-12:00 (Here we do nothing)
This was the initial description of the approach with the candle to trade being 2 hrs after the open (TradeInOpenBarOffset = 2), I think later on they change it 1hr after open (TradeInOpenBarOffset = 1), right?

Now on the next post the author explains why he used 9AM instead of 8AM:
This is the post http://www.forexfactory.com/showthread. ... ost7614444
London stocks open at 8 AM but forex "opens, the candle"at 9 AM. Plus we don't need to trade the opening breakout!
London is GMT.

GMT = Greenwich Mean Time
So in my case the broker that I am using is GMT + 2. So it is 2 hours ahead of GMT and that makes my LOTinBroker = 11AM (9AM + 2). But remember LondonGMTOffset is subtracted, so now my LOTinBroker = 10AM, just as you saw on the chart. In addition since I am using TradeInOpenBarOffset =1, then my trade candle is at 11AM (10AM +1).

ac what broker are you using. We just need to see what the GMT delta is on your broker and then I will compare times on my broker. You are correct, we should be in sync. About the only thing that may be different is the candle itself but we should not be this many hours out of sync.



Peace.
Author:  xmess7 [ Sun Aug 24, 2014 8:51 pm ]
Post subject:  Coin-Flip EA v2.0

acs » Sat Aug 23, 2014 2:04 pm wrote:EA v262 .................

as you can see in picture in last post TradeInOpenBarOffset = 2 works ok as in no errors as does
TradeInOpenBarOffset = 0 ..... But ! TradeInOpenBarOffset = 1 keeps giving a error and stops the EA
this offset =1 error could be a weekend thing so I will see how it goes on Sunday/Monday when market is open

....
Could you show my the error log.

Thnx
Author:  xmess7 [ Mon Aug 25, 2014 1:09 am ]
Post subject:  Coin-Flip EA v2.62

This is what I have for Sunday's opening.
CoinFlip262_Sunday.jpg
The EA so far is doing what it is supposed to...

ACS what does your look like?
Author:  acs [ Mon Aug 25, 2014 12:54 pm ]
Post subject:  Coin-Flip EA v2.0

Hi Jess :)
is this fun or what lol
ok my broker is also plus 2 from my time but here in the UK (England) we are in fact on
British Summer Time (BST) at the moment and it will revert back to GMT soon, can we
get any more confusion lol, it's no wonder people all over the internet are confused, this
is exactly one reason I have been sticking to London open in my chart Examples.

anyway see if this picture throws some light on the subject
by the way My start time for London Open is in sync with ForexFactory session hours
Author:  acs [ Mon Aug 25, 2014 1:07 pm ]
Post subject:  Coin-Flip EA v2.0

here is a picture showing my chart against FF web page that
shows London about to open if it was not a Bank Holiday lol.
the timing is a little out but it's hard to catch it right on time.
All times are UTC Page 16 of 19