Once a Month EA

Locked
excalibre30
Trader
Posts: 68
Joined: Sat Mar 08, 2014 7:45 am

Once a Month EA

Post by excalibre30 »

Haha. Everyone's anticipating and really itching to get this started too.
SteveHopwood » Fri Jun 06, 2014 5:43 am wrote:Earlier today being 'trading day no 4' I ran the simulator and saw a just over 6000 pip profit for the default stuff, so I launched OAM to see what would happen.

4 trades have hit tp, so 19 remain outstanding. Closed profit pips are c. 230, whilst closing the remaining trades would leave a profit of about 170 pips.

Going to leave the trades to run and see what happens. I am just getting itchy feet before the 7th trading day. :x

:xm:
User avatar
zader
Trader
Posts: 90
Joined: Fri Jul 06, 2012 8:46 am
Location: Rundown NW England

Once a Month EA

Post by zader »

excalibre30 » Fri Jun 06, 2014 4:09 am wrote:Haha. Everyone's anticipating and really itching to get this started too.
SteveHopwood » Fri Jun 06, 2014 5:43 am wrote:I am just getting itchy feet before the 7th trading day. :x
:xm:
Spare a thought for me, I'm not starting mine till day 17 :shock: The table I posted on page1 shows day 17 as the 1st day with no red numbers, so I expect it to go right into profit with no DD at all :lol:
excalibre30
Trader
Posts: 68
Joined: Sat Mar 08, 2014 7:45 am

Once a Month EA

Post by excalibre30 »

Spare a thought for me, I'm not starting mine till day 17 :shock: The table I posted on page1 shows day 17 as the 1st day with no red numbers, so I expect it to go right into profit with no DD at all :lol:
Yeah. I did not notice that. There is a difference of 400 pips though but the DD looks good if that happens.
User avatar
Elixe
Trader
Posts: 98
Joined: Tue Jun 04, 2013 6:44 pm
Location: France

Once a Month EA

Post by Elixe »

Steve, I might have found a bloop in the EA :

My parameters are :

Code: Select all

SendTradesDay = 7;
SendTradesHour = 9;
My trades got triggered 09/06 at 23h CET. I'm in France, CET (GMT + 2).

So, what I found out :
In GetTodayTradingDayNumber, you are counting TradingDay based on TimeCurrent(), that is the server time, for GP it is GMT + 3.

In onTick function, you are defining the hour :

Code: Select all

int hour = TimeHour(TimeLocal() );
(starting to see were i'm going ? Image)

Lower in the onTick, we have this :

Code: Select all

   if (DayTradingStatus == opentrading)
      if (hour >= SendTradesHour)
That's were lies the issue I think, when TimeCurrent() switched to day 7 / 00:00, TimeLocal() was day 6 / 23h. So DayTrading was saying "Hey Hour, go on i'm on the 7th day", and hour answered "Okay then, I'm at 23, that's way greater than 9, let's send thoses trades".

Haven't tested yet a solution as I just found that out, but just switching to an exact hour check will probably solve this.

There's probably the same issue in the closing code.
:D
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Month EA

Post by SteveHopwood »

Elixe » Tue Jun 10, 2014 7:23 pm wrote:Steve, I might have found a bloop in the EA :

My parameters are :

Code: Select all

SendTradesDay = 7;
SendTradesHour = 9;
My trades got triggered 09/06 at 23h CET. I'm in France, CET (GMT + 2).

So, what I found out :
In GetTodayTradingDayNumber, you are counting TradingDay based on TimeCurrent(), that is the server time, for GP it is GMT + 3.

In onTick function, you are defining the hour :

Code: Select all

int hour = TimeHour(TimeLocal() );
(starting to see were i'm going ? Image)

Lower in the onTick, we have this :

Code: Select all

   if (DayTradingStatus == opentrading)
      if (hour >= SendTradesHour)
That's were lies the issue I think, when TimeCurrent() switched to day 7 / 00:00, TimeLocal() was day 6 / 23h. So DayTrading was saying "Hey Hour, go on i'm on the 7th day", and hour answered "Okay then, I'm at 23, that's way greater than 9, let's send thoses trades".

Haven't tested yet a solution as I just found that out, but just switching to an exact hour check will probably solve this.

There's probably the same issue in the closing code.
I know. Mixing TimeCurrent() and TimeLocal() doesn't work here - I found out the same way you did. I will add the fixes soon.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
User avatar
fxozgirl
Trader
Posts: 1176
Joined: Wed Nov 16, 2011 9:16 am
Location: Melbourne, Australia

Once a Month EA

Post by fxozgirl »

fxozgirl » Tue Jun 03, 2014 7:27 am wrote:
So I think I am going to run the following demo's:

1. Based on last 12 months analysis Trade Day 7 using TakeProfitMultiplierPercent at 50%
2. Based on last 12 months analysis Trade Day 7 and using Paul's MPBM set for 250 pips TP per pair (does anyone know if MPBM has been update to work on Empty4 6xx?)
3. Based on last 12 months analysis Trade Day 7 and using the average highest pips won & lowest pips won, I will set an individual TP for each pair.

My 3 demo's fired up yesterday:
Demo 1 & 2, Day 7 - 8.00am start time, which is 1 hour into the new trading day here.
Demo 3 - 7.00am start time (1 hour earlier at day open)

Demo 1 & 3 results almost identical
OAM_open_trades_11.06.14.png
Demo 2 - OAM set all TP at the same price as the open price...just wondering if that would be caused by changing the TakeProfitMultiplierPercent to 0.0? I did have MPBM set up to manage the trades as a basket. I re-set the EA to open on Day 8 so will see if the same thing occurs again.
OAM2_closed_trades_10.6.2014.png
You do not have the required permissions to view the files attached to this post.
OldTrader
Trader
Posts: 71
Joined: Wed Nov 16, 2011 10:19 pm

Once a Month EA

Post by OldTrader »

mine did the same thing, and i had my tp set to 50%. so dunno
User avatar
Elixe
Trader
Posts: 98
Joined: Tue Jun 04, 2013 6:44 pm
Location: France

Once a Month EA

Post by Elixe »

fxozgirl » 25 minutes ago wrote:just wondering if that would be caused by changing the TakeProfitMultiplierPercent to 0.0?
Glancing at the code, I would say yes, as the take profit is computed by adding the average TP multiplied by TakeProfitMultiplierPercent to the order open price.

One fast fix would be to edit lines 916 & 922 this way but wait for Steve's opinion on this :

Code: Select all

916 : if (type == OP_BUY && TakeProfitMultiplierPercent > 0)
922 : if (type == OP_SELL && TakeProfitMultiplierPercent > 0)
OldTrader, in the user feedback, does the av prof has a value ? another reason for this TP = Open Price would be that the average profit calculation returned 0 (that might be a missing history issue then ?).
:D
User avatar
SteveHopwood
Owner
Posts: 9904
Joined: Tue Nov 15, 2011 8:43 am
Location: Misterton - an insignificant village in England. Very pleasant to live in.

Once a Month EA

Post by SteveHopwood »

fxozgirl » Tue Jun 10, 2014 8:58 pm wrote:
fxozgirl » Tue Jun 03, 2014 7:27 am wrote:
So I think I am going to run the following demo's:

1. Based on last 12 months analysis Trade Day 7 using TakeProfitMultiplierPercent at 50%
2. Based on last 12 months analysis Trade Day 7 and using Paul's MPBM set for 250 pips TP per pair (does anyone know if MPBM has been update to work on Empty4 6xx?)
3. Based on last 12 months analysis Trade Day 7 and using the average highest pips won & lowest pips won, I will set an individual TP for each pair.

My 3 demo's fired up yesterday:
Demo 1 & 2, Day 7 - 8.00am start time, which is 1 hour into the new trading day here.
Demo 3 - 7.00am start time (1 hour earlier at day open)

Demo 1 & 3 results almost identical


Demo 2 - OAM set all TP at the same price as the open price...just wondering if that would be caused by changing the TakeProfitMultiplierPercent to 0.0? I did have MPBM set up to manage the trades as a basket. I re-set the EA to open on Day 8 so will see if the same thing occurs again.
If you set a multiplier value to zero, then it multiplies the figure it is multiplying by zero, giving a result of zero. So, you add zero to the order open price and your tp is the same as the order open price. I am surprised your platform did not whinge at you and refuse to play ball.

:xm:
Read the effing manual, ok?

Afterprime is the official SHF broker. Read about them at https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?p=175790#p175790.

I still suffer from OCCD. Good thing, really.

Anyone here feeling generous? My paypal account is always in the market for a tiny donation. pianodoodler@hotmail.com is the account.

To see The Weekly Roundup of stuff you guys might have missed Click here

My special thanks to Thomas (tomele) for all the incredible work he does here.
OldTrader
Trader
Posts: 71
Joined: Wed Nov 16, 2011 10:19 pm

Once a Month EA

Post by OldTrader »

thanks yeah, apparently i just didn't notice that it was 0. i just changed chart tf and back, and i get the av tp now.
Locked

Return to “Automated trading systems”