Great EA in backtest! - page 108

 

last weeks demo results

Hello world.

it was around past friday when i discovered a potential bug when calculating blocked hours.

i am using FXDD with a setting of GMT=3. the followings piece of code should calculate the current hour (gmt).

int hadj=TimeHour(CurTime())-GMT;

however, at 00:00 FXDD time, this function returns -3, at 01:00 it returns -2 and at 02:00 it returns -1. but the correct values should be 21, 22, and 23.

this was the reason my blocked hours of 23:00 gmt for the JPY pairs never got blocked.

i have added this code to offset this mistake:

if (hadj<0) hadj = hadj + 24;

anyways, here're the results from last week... nothing spectacular though.

my live account didn't perform that good either.

what upsets me most is that backtests after the fact turn out to be absolute winners across the board. winning backtest trades never got executed during live trading and loosing trades during live traded never showed during the backtests. this is a wicked world.

AZBOfin

 

Aragorn, are you using the default settings for your 1.0 R2 version, or did you change anything. risk, lots etc don't matter anyways, i'm more wondering about the filters, SL settings and such.

i have added your EA-revision as of today (missed yesterdays day of trading) to my live portfolio for the EUR$. i hope it can win back what the "original" version lost

AZBOfin

BTW: good job with the programming indeed

 
Aaragorn:
I gotta tell ya, I STILL love waking up in the morning to see that this EA has made money while I slept.

I am doing a comparision of my live account which is now only running the alerteuro version and the demo account which I am allowing to run the alert euro AND the usdcad AND the usdjpy version all of which I posted earlier in the thread...of the three the usdjpy is by far the most active, and it also is by far the least profitable, it seems to barely do more than break even and sometimes loses alot. I wanted to see if the three pairs together would make more or less than just the euro itself would make which is the most reliable result I see so far.

Well the three together have nearly busted my demo account back to where my live account is...they are lousy together! I think I'll keep letting the euroalert version run in demo at risk=1 and in my live account at risk=.25 The balance in my live account this morning is $315.16 and in my demo it's $322.63. Nearly the same now, I'll see in demo if I could tolerate a higher risk?

in the mean time...along the development trail...

I am having some issues with creating a histogram with the support and resistance data. I obviously don't have loops and arrays mastered. I am trying to get a loop to cycle thru an array and if it does match a value already in the array then increment the count and move on the the next value and if it doesn't find a match then append the value into the end of the array. It is proving disgustingly difficult. In the first place the array only allows intergers so i have to convert the price level value into an interger. It has to go thru two data type conversions to do that....THEN...it has to incerment inside the loop which apparently it's not doing. It's looping ok but it's not incermenting the test values....oy vey. Where is the coding wizzard when I need one?

#define SIZE 50 // must be set to match NumberOfBars

static int Index = 0;

static double Opens[ SIZE ] = { 0 };

static int TotalOMatches[ SIZE ] = { 0 };

static double OpenHistogram[2][ SIZE ] = { 0 };

int ct5=0,i5=NumberOfBars;

int level=0,matches=0;

// This loop cycles TotalOMatches thru the OpenHistogram looking for identical price levels and creates histogram of all unique open levels and their associated matches

for(ct5=NumberOfBars;ct5>0;ct5--)

{

string Openhist=DoubleToStr(Opens,4*10000);

int Ohist=StrToInteger("Openhist");

Print("Ohist: ",Ohist," ",TotalOMatches);

while(OpenHistogram[level][matches] == OpenHistogram[Ohist][TotalOMatches])

{

level++;

matches++;

Print("Ohist: ",Ohist," ",TotalOMatches);

//Print("cycle: ",i5);

if(OpenHistogram[level][matches] != OpenHistogram[Ohist][TotalOMatches])

{

OpenHistogram[level][matches] = OpenHistogram[Ohist][TotalOMatches];

// We print the result

Print("Open Histogram: ",OpenHistogram[level][matches]);

Print ("Open Histogram2: ",OpenHistogram[Ohist][TotalOMatches]);

}

i5--;

}

}

when I run this it prints

Ohist 0, 0

Ohist 0, 0

Ohist 0, 0

Ohist 0, 0

.....

about a million times.

If anyone can help me get this working feel free too. It's got me twisted around a pole.

 
AZBOfin:
Aragorn, are you using the default settings for your 1.0 R2 version, or did you change anything. risk, lots etc don't matter anyways, i'm more wondering about the filters, SL settings and such.

i have added your EA-revision as of today (missed yesterdays day of trading) to my live portfolio for the EUR$. i hope it can win back what the "original" version lost

AZBOfin

BTW: good job with the programming indeed

Thanks, I could still use some coding help. Know anyone who could assist me? Actually I see myself coding like mickey mouse in fantasia when the wizzard has his back turned.

This is what I'm running right now. I have shut everything else down. Yes it is a wicked world, but I notice that I am still playin the game. It's amazing how my attitude toward the world changes when I'm profiting as opposed to when I'm drawing down. My effort now is focused on improving the money management side of the decisions. Hopefully I can get the support/resistance thing working before too long.

wow how about that move this morning! too bad I didn't catch that wave...but then again this system isn't winning by catching big moves. At least how I have it winning it's just looking for 7 pips on a high probability reverse when the cci is right. The thing I have to remember is that 7 pips 3 times a day is 21 pips a day and if it does that every day or even close to that with any degree of reliability it's a great system that can be leveraged into making millions in only a few months. I have to keep the goal in sight and not get distracted by the flashiness of the the market. All that flashiness is useless unless you can capture it with some degree of reliability. I see more reliability in this system just as it is than in anything else I have studied thus far, that's why I'm still working on it.

 

I think I am seeing a pattern.

The last time there was a big move like just happened this morning...

the program took three trades amongst the retracement reverses that followed. It took one short position and two long positions.

It won the short which was coming down from the peak off the big move. And it lost the first long position and then won the second one. The second one was actually better in terms of reversal (obviously)

so...

my thinking is that for right now until I can program it to recognize these conditions I manually prevent it from taking a long position right now. because the first long position it might take is as near as I can see from the last cycle a lower probability than the second long position it might take. I will therefore right now manually block long positions and monitor this. I don't have to prevent too many losers to make a difference here.

I also see this is now trading just below where I have a resistance line drawn at 1.2781. Dang I wish I know how to make my support resistance histogram available to this code right now...oy

 

ok I added

break; at this point in the code I just posted...

}

i5--;

break;

}[/PHP]

now it's printing the second variable of the array...that's the matches

[PHP]2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 4

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 4

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 3

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 3

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 2

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 5

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 5

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 5

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 5

2006.10.31 10:50:11 2006.10.27 13:03 Support and Resistance EURUSDm,H1: Ohist: 0 5

now if I can figure out how to get the levels thru their data type conversion and incermenting....hum

 

hello aragorn

i`m also playing with this system but have different results.

can you be so kind and make a screenshoot of one day of the last days??

also i`m wondering , my alarm window looks cyberia alert - selling eur/usd but the system sell gbp/usd ?? (i have running 2 windows eur/usd,gbp/usd)

thanks for help and information

begu

Files:
 
forex2006:
hello aragorn

i`m also playing with this system but have different results.

can you be so kind and make a screenshoot of one day of the last days??

also i`m wondering , my alarm window looks cyberia alert - selling eur/usd but the system sell gbp/usd ?? (i have running 2 windows eur/usd,gbp/usd)

thanks for help and information

begu

understand that what I have built with alarms is specifically for the eurusd pair exclusively. It could be changed in the code to say gbpusd but I don't recommend running the euroalert version on any other pair beside the pair it is optimized for.

I'm not sure what you hope to gain from me posting a screenshot. Actually I am too busy right now with developing to do that for you, I'm sorry. perhaps some later time when I understand more what exactly you are hoping to learn from it.

ok there you go...for whatever it's worth.

Files:
aleerteuro.gif  61 kb
 

Ok I think I've learned a lesson about trying to manually improve the trades...the demo took a long position and won it and my live account didn't because I had long trades blocked...oy lol I'm going back to allow both long and short....proof that I'm not a trading genius. another theory proved less than impeccable...

on the up side i am getting the arrays and loops to work better now.

fyi,

http://www.212movie.com/

 

Ok I have resolved the data conversion issues. I made a previous loop load all the values of the prices *10000 into an interger array before the code executes this loop. Now I simply call the interger array in this one.

int ct5=0,i5=NumberOfBars;

int level=0,matches=0;

// This loop cycles TotalOMatches thru the OpenHistogram looking for identical price levels and creates histogram of all unique open levels and their associated matches

for(ct5=NumberOfBars;ct5>0;ct5--)

{

//Print("bar: ",i5," Ohist: ",OpensInt," ",TotalOMatches);

while(OpenHistogram[level][matches] == OpenHistogram[OpensInt][TotalOMatches])

{

level++;

matches++;

//Print("Ohist: ",Ohist," ",TotalOMatches);

Print("cycle: ",i5," Ohist: ",OpensInt," ",TotalOMatches);

if(OpenHistogram[level][matches] != OpenHistogram[OpensInt][TotalOMatches])

{

OpenHistogram[level][matches] = OpenHistogram[OpensInt][TotalOMatches];

// We print the result

Print("Open Histogram: ",OpenHistogram[level][matches]);

Print ("Open Histogram2: ",OpenHistogram[OpensInt][TotalOMatches]);

}

i5--;

break;

}[/PHP]

this is the output...

[PHP]2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 1 Ohist: 12730 3

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 2 Ohist: 12730 3

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 3 Ohist: 12725 2

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 4 Ohist: 12722 2

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 5 Ohist: 12730 3

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 6 Ohist: 12713 1

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 7 Ohist: 12684 2

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 8 Ohist: 12679 4

2006.10.31 14:38:28 2006.10.27 19:59 Support and Resistance EURUSDm,H1: bar in loop: 9 Ohist: 12666 2

A problem still remains...

you can see that bar in loop 1,2 and 5 are all the same. So while this is now managing the extracted data it is still not making a consolidated histogram which only has one entry for each price level....

Something about the part that is supposed to append the unique values into the end of the histogram isn't working still....huummm..I'm just not familliar with arrays let alone two dimensional arrays. To someone who knows how to do this it's probably very obvious what I'm doing wrong.

Reason: