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

Once a Month EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3649
Page 11 of 18
Author:  Elixe [ Thu Jul 03, 2014 8:48 am ]
Post subject:  Once a Month EA

padnoter » Yesterday, 16:46 wrote: [...]
- by re-calculating the chigh/clow just before checking for tp & pprofit
- but as any coders will see, I've hardcoded the 2 - it works today and only for June calcs! lol - it needs to be the month-end shift that we are calc'ing.
[...]
Hi, I think I have an idea on how to do the shift programmatically, can't really work on it today but I'll give it a try tonight and let you know if I can come up with something working
Author:  Elixe [ Thu Jul 03, 2014 10:04 pm ]
Post subject:  Once a Month EA

Here is the trade simulator modified, It will only take the high/low after the trading day trigger to calculate the profit.

I've also added a csvLog boolean to make the screen comment print in expert window in a convertible format you can quickly paste in Excel or Calc with ";" separator.

Just open the daily log (right click the expert logs and select open to access the log files)

As always, I suggest you wait for Steve's opinion regarding any changes I make to things he coded before using it :)

Steve, I have added a function at the end called getMonthAverageProfit that takes care of the averaging process, it is commented.
Author:  zader [ Mon Jul 07, 2014 5:53 am ]
Post subject:  Once a Month EA

Trades away today :good:
GP still demo for now, 21 pairs, Day 4, London open, TP 50%
I'll post updates every now and then.

Edit: Update
I week on and no TP's :( It's been as low as -900pips but is slowly recovering to only -600 now.
Author:  SteveHopwood [ Sun Jul 13, 2014 9:14 am ]
Post subject:  Once a Month EA

Ehup guys. Take a peek at what Radar is getting up to at http://www.stevehopwoodforex.com/phpBB3 ... 556#p94556. It looks outstanding.

:xm:
Author:  SteveHopwood [ Sun Jul 13, 2014 11:28 pm ]
Post subject:  Once a Month EA

zader » Mon Jul 07, 2014 5:53 am wrote:Trades away today :good:
GP still demo for now, 21 pairs, Day 4, London open, TP 50%
I'll post updates every now and then.

Edit: Update
I week on and no TP's :( It's been as low as -900pips but is slowly recovering to only -600 now.
Waiting for a few of my D7 trades to go to TP as well. Hey ho.

:xm:
Author:  zader [ Mon Jul 14, 2014 8:30 am ]
Post subject:  Once a Month EA

zader » Mon Jul 07, 2014 5:53 am wrote:Trades away today :good:
GP still demo for now, 21 pairs, Day 4, London open, TP 50%
I'll post updates every now and then.

Edit: Update
1 week on and no TP's :( It's been as low as -900pips but is slowly recovering to only -600 now.
Not a good start to this week after recovering to -600 that more than doubled to over -1200, I'll be amazed if it can recover from here, so might be a good time to start the 2nd basket.
GP Day 9, 21 pairs OOTB TP :good:
Author:  zader [ Mon Jul 21, 2014 6:11 am ]
Post subject:  Once a Month EA

quick update:
1st basket had 2 TP's :cheer: but is -1012 :cry: on the running trades.

2nd basket has had 3TP's :clap: running trades are -1015 :arrrg:
Author:  excalibre30 [ Mon Jul 21, 2014 6:15 am ]
Post subject:  Once a Month EA

Currently, at -498 pips. Trade opened on Day 7. Set no TP. Used MPBM to monitor and hit tP as basket at 400 pips.
Author:  Elixe [ Mon Jul 21, 2014 7:42 pm ]
Post subject:  Once a Month EA

Here are the results so far with TP based on my modified averaging method :

Day 7, TP 33 : Net Pips -540 (11 trades reached TP for 510 pips), Floating : -1050
Day 7, TP 50 : Net Pips -500 (7 trades reached TP for 450 pips), Floating : -950
Day 7, TP 66 : Net Pips -430 (6 trades reached TP for 490 pips), Floating : -920
Author:  SteveHopwood [ Tue Jul 22, 2014 9:18 pm ]
Post subject:  Once a Month EA

V 1d is in post 1. I noticed some odd thingies in relation to trading day of the month calculation and was somewhat aghast at what I saw when I looked at the code.

Guys, it is a tad scary that nobody else noticed. Do none of you ever look at the chart feedback? How much money do you all want to lose?

For those of you who want to preserve your hard-coded inputs, copy this over the top of the existing void GetTodayTradingDayNumber() function:

Code: Select all

void GetTodayTradingDayNumber()
{
   //Calculate today's trading day relative to the open date of the MN1 candle   
   
   //Get the time of the MN1 open
   double ctime = iTime(Symbol(), PERIOD_MN1, 0);
   
   //Get the D1 shift of ctime
   int shift = iBarShift(NULL, PERIOD_D1, ctime, false);
   //shift--;//The calculation was out by one day on Sunday night June 1st at markets open time. Trying this to see if it is needed throughout the month.
   
   //Iterate a loop to calculate the number of trading days between ctime and now
   TradingDay = 0;
   for (int cc = shift; cc >= 0; cc--)
   {
      //Ignore weekend candles
      if (TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, cc) ) == 6 || TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, cc) ) == 0)
      {
         //cc--;
         continue;
      }//if (TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, cc) == 6 ?? TimeDayOfWeek(iTime(Symbol(), PERIOD_D1, cc) == 7)
     
      TradingDay++;
   }//for (int cc = shift; cc > 0; cc--)
   
   
   //Define today's trading status for display
   DayTradingStatus = notrading;
   if (TradingDay == SendTradesDay) 
      DayTradingStatus = opentrading;
   else
      if (TradingDay == CloseTradesDay) 
         DayTradingStatus = closetrading;   
       

}//End void GetTodayTradingDayNumber()

:xm:
All times are UTC Page 11 of 18