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

Once a Month EA
https://www.stevehopwoodforex.com/phpBB3/viewtopic.php?t=3649
Page 10 of 18
Author:  padnoter [ Wed Jul 02, 2014 7:43 am ]
Post subject:  Once a Month EA

ok cheers - i better go back and run the simulator and see if i can find out why the big difference in my result & simulator.. ta
Author:  rapple [ Wed Jul 02, 2014 7:45 am ]
Post subject:  Re: Once a Month EA

padnoter wrote:<null>
Great. I would also like to compare with your results to make sure I didn't make a mistake
Author:  padnoter [ Wed Jul 02, 2014 12:46 pm ]
Post subject:  Once a Month EA

hi rapple,
well my results are broadly similar (I do trade a 4(in bold) more pairs than the standard ootb);
AUDCAD,AUDCHF,AUDNZD,AUDJPY,AUDUSD,CADCHF,CADJPY,CHFJPY,EURAUD,EURCAD,EURCHF,EURGBP,
EURNZD,EURJPY,EURUSD,GBPAUD,GBPCAD,GBPCHF,GBPJPY,GBPUSD,NZDUSD,
NZDCHF,NZDCAD,NZDJPY,USDCAD,USDCHF,USDJPY

Open Day, Net Pips
2 -1467
3 -2067
4 -2055
5 -2080
6 -527
7 -550
8 554
9 -598
10 138
11 36
12 52
13 -245
14 522
15 832
16 553
17 1098
18 1199
19 1010
20 888

biggest differences I can see are Open Day=7,8,13.
Here's the detail for day 13 (you have +944, I have -245);
day13.png
this was FXCM demo (they are GMT+0)
Author:  padnoter [ Wed Jul 02, 2014 1:07 pm ]
Post subject:  Once a Month EA

oh and just realised my simulator run gave +553 for my demo oam day 16, which in oam demo I got -634. :?

- ok i see the answer - the simulator closes at the monthly candle close.... (which is different to my oam run closing on day 20).. i'll check my trades and see what diff
Author:  padnoter [ Wed Jul 02, 2014 1:22 pm ]
Post subject:  Once a Month EA

for interest;
fxcm_24m_oam_simulator.png
Author:  padnoter [ Wed Jul 02, 2014 2:04 pm ]
Post subject:  Once a Month EA

oops my bad, i've re-read steve's intro to the simulator;
This is a very blunt instrument. Profit and loss is calculated, taking buy trades as an example:

if the high of the MN1 candle >= the trade's simulated take profit, then the tp is used as the profit for that trade.
if tp is not hit, then the simulated open price is subtracted from the MN1 candle close. An MN1 candle closing lower than the simulated open price, the result is a loss.
and can now see why there are differences between simulator and demo.
example - EURAUD;
simulator_v_demo.png
- at least i'm clear what the simulator does now. So the later the open day, the less accurate the simulation (as the TP may be before the open day) - that's not a criticism steve, as you said it's "blunt", it's a great idea & great code... i'm just trying to work out what is what - and i misread what it was doing! Hope that's correct?
cheers
Author:  padnoter [ Wed Jul 02, 2014 2:46 pm ]
Post subject:  Once a Month EA

I can't quite work out the code - oam simulator.
Am trying to get it to look at TP only after the opening day (so not just month high/low).

I can get it working for day16 today with this;

in void SendTheTrades() function;

Code: Select all

         double tp = 0;
         chigh=iHigh(TradePair[d],PERIOD_D1,iHighest(TradePair[d],PERIOD_D1,MODE_HIGH,shift,2));
         clow=iLow(TradePair[d],PERIOD_D1,iLowest(TradePair[d],PERIOD_D1,MODE_LOW,shift,2));
         if (TradeType == buy)
         {
            tp = popen + (AvProf / factor);
- 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.

maybe steve or someone better than me at coding can figure it ?

- but that code does get the simulator to give me a correct loss of 63 on euraud in june (day start 16) & an overall loss over 24pairs of 162pips... better than my demo, which shows a close on month end would have been better for me in june (rather than close at day 20)

Hope this helps.
Author:  putusernamehere [ Wed Jul 02, 2014 7:38 pm ]
Post subject:  Once a Month EA

Hi; :hi:
I have testet the OAM on my demo open day 24.06,(Send Trades Day 17) 9.00 am server time GP with positive results, :good:
today I closed all and I will run the OAM on my real account this month

Cheers Gunter :hi:
Author:  SteveHopwood [ Wed Jul 02, 2014 9:21 pm ]
Post subject:  Once a Month EA

padnoter » Wed Jul 02, 2014 2:46 pm wrote:I can't quite work out the code - oam simulator.
Am trying to get it to look at TP only after the opening day (so not just month high/low).

I can get it working for day16 today with this;

in void SendTheTrades() function;

Code: Select all

         double tp = 0;
         chigh=iHigh(TradePair[d],PERIOD_D1,iHighest(TradePair[d],PERIOD_D1,MODE_HIGH,shift,2));
         clow=iLow(TradePair[d],PERIOD_D1,iLowest(TradePair[d],PERIOD_D1,MODE_LOW,shift,2));
         if (TradeType == buy)
         {
            tp = popen + (AvProf / factor);
- 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.

maybe steve or someone better than me at coding can figure it ?

- but that code does get the simulator to give me a correct loss of 63 on euraud in june (day start 16) & an overall loss over 24pairs of 162pips... better than my demo, which shows a close on month end would have been better for me in june (rather than close at day 20)

Hope this helps.
Frankly, I am starting to despair of reading anything here that actually helps anyone. Posts are often made by those too lazy to start by reading post 1 properly. Not a problem for me as I know what is going on, except that I find myself having to read rubbish posts.

Hey ho. I shall continue to try to be patient. Don't count on this; I have been known to have the occasional bad mood.

:xm:
Author:  SteveHopwood [ Wed Jul 02, 2014 9:23 pm ]
Post subject:  Once a Month EA

putusernamehere » Wed Jul 02, 2014 7:38 pm wrote:Hi; :hi:
I have testet the OAM on my demo open day 24.06,(Send Trades Day 17) 9.00 am server time GP with positive results, :good:
today I closed all and I will run the OAM on my real account this month

Cheers Gunter :hi:
Good luck. My own trade sending day approaches, so we shall soon be off to another round of live trading.

:xm:
All times are UTC Page 10 of 18