logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

2 Pages<12
Options
Go to last post Go to first unread
HyperionAUT  
#21 Posted : Thursday, January 10, 2013 7:25:01 PM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

Hi my friend, again!

So to your questions, all 3 are true.. not the right, not that often, not .. at all?? and the conditions are "true" when i start the expert advisor.. so at least.. 30 trades in every Index should be "runed" with the EST.

Here is everything I have, i hope this helps us. : D

The code in the expert are the same as in the EST. I just copied what you programed into those fields, and .. : )) was hoping that it work out? they should be the same, right? so the sell and buy symbols are based on the conditions, if i copy them into the buy/sell/cover cells, it should work the same, was my opinion. ?!? ^¿^

Good is, that i have used (long and short) but there are really only LONG trades used! the "trend filter" is working.

In the System Tester (Codes are the same in Expert Advisor (your FmlVar(..)):

General:

I tried at least every bulletpoint (long, short), single, multiple…

BUY ORDER

{LONG ENTRY}

When(Mov(L, 90, W), >, Mov(H, 200, E)) AND

FmlVar("HyperionAUT","LE");

Sell Order

{LONG EXIT}

FmlVar("HyperionAUT","LX");

Sell Short Order

{SHORT ENTRY}

When(Mov(H, 90, W), <, Mov(L, 200, E)) AND

FmlVar("HyperionAUT","SE");

Buy to Cover Order

{SHORT EXIT}

FmlVar("HyperionAUT","SX");

Entry Size % of Available Equity: 100% (for long and short), exit and buy (and sell short) [x]market

NO STOPS used (like trailing and whatever..)

UserPostedImage

When (or befor) starting the backtest I used:

DATES: 800,

Portflio [x] BOTH

% of Available Equity 100

The Result for 3 Indices are:

UserPostedImage

DJ : 0 Trades
NQ 100: 6 Trades
S&P : 7 Trades

Here the NQ 100 (PLOT ON CHART):

UserPostedImage

Here are the Expert Advisor BUY and Sell dots. MUCH MORE!!! So alt least it is not buying every time, i dont think that it is building a pyramid, hmm. So here may should be opend 20 BUY positions and 4 Exits (including close at the last bar).

UserPostedImage

Yes, I look after the exercises to not use the WHEN() anymore, promis!.

Thanks!

wabbit  
#22 Posted : Thursday, January 10, 2013 7:30:06 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Read the MS Users Manual, then on the General tab in your system test, check the appropriate box and set the limit for open simultaneous orders to 65536, or another appropriate number.


wabbit [:D]
HyperionAUT  
#23 Posted : Thursday, January 10, 2013 7:40:19 PM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

Okay thanks!

So I used the MOV 90 > 200 conditions in your indicator-code.

Just added one line, it is still working (exactly the same) : ))

but the EST not.

if I delete this MOV conditions, then it starts to make 31 trades,

rediculous trades.. it is not following what the EA shows.

(first the WHEN was irritating, but now.. without it.. there is no sense at all?)

HyperionAUT  
#24 Posted : Thursday, January 10, 2013 8:14:53 PM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

Hmm... could it be, ....

no clue... thnx!

wabbit  
#25 Posted : Friday, January 11, 2013 9:42:49 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Check your position size settings, or even more simply, just do a points only test.

Also , as you're trying to check the EST vs the EA, I'd be editing the code of the EA to take your "filter" condition into account there, instead of having the EA working on one set of signals and the EST then taking those signals and applying a filter.


wabbit [:D]

HyperionAUT  
#26 Posted : Monday, January 14, 2013 7:00:36 AM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

Hi Wabbit,

I am still trying, but... I believe now the EST is not understanding the "exit" function correctly, for the "new entry" signal, to build a pyramid.

I only copyed the LONG enter, and exit condictions into EST.

Also the filter is, only to BUY in a kind of Bull market, (those conditions are working),

but .... when I plot the results on chart, there are again only:

1 buy arrow, in a long-term up trend

1 exit arrow.

So, at least for this trade, one buy and one sell (exit). this is one trade (or two).

with the EA, there are 10 buy dots, and one exit sign.

So the EA is working, but the complexer system for RE ENTERYING into a trade, is not correct.

during this time, there is one buy trade, and one exit.

I try to understand your code, so that I somehow exit the position without selling it, like the EST will hold those 10 buy prices in his mind, and will sell all 10 at the EXIT condition price and calculate it, like I would do it by hand.

So, when I can do it via hand, due to the EA, and my brain-function is programmed into the EST, an the results are not the same, no : ) not I am crazy, I´ll try to find those su*** mistake, then it will work perfect!

It must be at least the programmed logic, not the EST parameters I use (or insert, like points etc).

Have you ever tried those code on your own in EST? I guarantee you will get the similar (not loved) results like I do, even if you know how the parameters for the EST are used correctly.

So hold on in a few (hours, days) I come up with the solution!

YEAH!!

wabbit  
#27 Posted : Monday, January 14, 2013 7:09:51 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
HyperionAUT wrote:
Have you ever tried those code on your own in EST? I guarantee you will get the similar (not loved) results like I do, even if you know how the parameters for the EST are used correctly.

As I said before: check your position size (or better still, do a points only test) and the EST settings.



wabbit [:D]

wabbit attached the following image(s):
HyperionAUT.png
HyperionAUT  
#28 Posted : Monday, January 14, 2013 7:32:02 AM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

No comment from my side.. it looks as I want it ..

okay... I start from the first Step again, maybe I made a mistake?!

(it must be because my results are bullshit)...

Okay, okay.. thanks for your patience

HyperionAUT  
#29 Posted : Monday, January 14, 2013 8:28:14 AM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

Hi Wabbit, okay finally I found what the mistake was.

As "I" tried to add the trend filter, I modifyed your code. This was the mistake.

While EA is taking it and works correctly, the EST was not.

When I use the EST for indices it looks good, cause the trends are longer lasting.

But for stocks, it is very bad. And thats why I was trying to implement a kind of trend filter.

So only enter long, during a long market, which was "filtered via MA".

And thats now working.

So if the 13 MA is crossing above the 90 MA long is okay. If the 13 MA is crossing below the 38 EXIT.

Re-Enter if the 13 MA is crossing up 38 again, and still above 90 MA (the 13MA).

these are conditions for long entering positions as a MAIN filte for all the code, you already did.

Just tell me, can i use this with a IF condition( if.. main filter = true, next step with your code?)

all the best!

wabbit  
#30 Posted : Monday, January 14, 2013 4:16:15 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
HyperionAUT wrote:
Just tell me, can i use this with a IF condition( if.. main filter = true, next step with your code?)
You don't even need the If(), just add the additional criteria to the conditions. wabbit [:D]
HyperionAUT  
#31 Posted : Monday, January 14, 2013 10:13:55 PM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

Yehaaa you made it!

Thanks for all your help, now it is working perfect.

You are a very wise man, Wabbit!

[ip]

... and what about me?
I´ll book my ticket for Hawaii,
´cause I´m getting fu**ing rich
right now!!!

wabbit  
#32 Posted : Monday, January 14, 2013 11:05:33 PM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
HyperionAUT wrote:
I´ll book my ticket for Hawaii,´cause I´m getting fu**ing rich right now!!
You could always send me some of that easily made millions, or make a donation to http://www.guidedogswa.com.au/
HyperionAUT  
#33 Posted : Saturday, January 26, 2013 7:51:33 PM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

UPDATE for the EXIT Strategy, very useful for the EST!! Results are now what I was "visually" expecting (befor the help of Wabbit and his Code). After 2 weeks, at least with no sleep, I come up with a 2-line modification. Yeah! It´s worth it!

{HyperionAUT}

TIMELONG:=13;
TIMESHORT:=15;

pds:=20;
depth:=1;

Hi:=(HHV(H,pds-1)>H)>Ref(HHV(H,pds-1)>H,-1);
HiVal1:=ValueWhen(1,Hi,Ref(H,-1));

Lo:=(LLV(L,pds-1)<L)>Ref(LLV(L,pds-1)<L,-1);
LoVal1:=ValueWhen(1,Lo,Ref(L,-1));

Hi:=Hi AND HiVal1>LoVal1*(1+depth/100);
Lo:=Lo AND LoVal1<HiVal1*(1-depth/100);

supp:=ValueWhen(1,Lo,Ref(L,-1));
res:=ValueWhen(1,Hi,Ref(H,-1));

BullBearPower:=FmlVar("Bull Power/Bear Power Histogram","ma");

{ == LONG trades == }
LE:=
O > Mov(C, 50, W) AND
Mov(O, 21, W) > Mov(O, 38, E) AND
Mov(C, 5, W) > Mov(C, 13, W) AND
L > SAR(0.075, 0.75) AND
BullBearPower>0 AND
Mov(V, 30, S) > 700 AND
Mov(L, 5, W) > Mov(H, 150, E) AND
Mov(L, 5, W) > Mov(H, 90, W);

LX:= O < SAR(0.075, 0.75);

{the LE condition is reset by LX}
LE:=BarsSince(LE)<BarsSince(LX);
LE:=LE>Ref(LE,-1);

{LE2 is a secondary trigger, independent of LE and LX (above)}
LE2:=C > res AND L > HHV(Ref(H, -1),5);
LE2:=LE2>Ref(LE2,-1);

{the combined trade trigger}
LE:=LE OR LE2;

{exit all LONG trades trigger}
LXRAUS:= LLV(Ref(L, -1),TIMELONG);
LX:= L < LXRAUS;

{L <= (Mov(Mov(O,50,W)-( Mov(O,50,W)*(2.0/100)),5,W));}

LX:=BarsSince(LX)<BarsSince(LE);
LX:=LX>Ref(LX,-1);


{ == SHORT trades == }
SE:=
O < Mov(C, 50, W) AND
Mov(O, 21, W) < Mov(O, 38, E) AND
Mov(C, 5, W) < Mov(C, 13, W) AND
L < SAR(0.075, 0.75) AND
BullBearPower<0 AND
Mov(V, 30, S) > 700 AND
Mov(L, 5, W) < Mov(H, 150, E) AND
Mov(L, 5, W) < Mov(H, 90, W);

SX:= O > SAR(0.075, 0.75);

{the SE condition is reset by SX}
SE:=BarsSince(SE)<BarsSince(SX);
SE:=SE>Ref(SE,-1);

{SE2 is a secondary trigger, independent of SE and SX (above)}
SE2:=C < supp AND H < LLV(Ref(L, -1),5);
SE2:=SE2>Ref(SE2,-1);

{the combined trade trigger}
SE:=SE OR SE2;

{exit all SHORT trades trigger}
SXRAUS:= HHV(Ref(H, -1),TIMESHORT);
SX:= H > SXRAUS;
{H >= (Mov(Mov(O,50,W)+( Mov(O,50,W)*(2.0/100)),5,W));}

SX:=BarsSince(SX)<BarsSince(SE);
SX:=SX>Ref(SX,-1);

{plot}
2*LE;LX;
-2*SE;-SX;

Equity line is really nice!! : D
Wabbit, your Bank Account for a little tip, plz ´cause the millions of dollars are just around MY corner : D
You know, Switzerland and Liechtenstein is very wealthy (@ middle of Europe) : ))

Thanks for alle, now it´s *perfect* [no holy grail but I can work with it powerful]

wabbit  
#34 Posted : Sunday, January 27, 2013 1:09:22 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Turtle traders are big fans of exiting LONG trades on the new lower close and SHORT trades on the new higher close; from memory they entered on 55 periods and exited on 21 periods.

You could also investigate a Chandelier exit, or even a simple retracement trailing stop.



wabbit [:D]

HyperionAUT  
#35 Posted : Sunday, January 27, 2013 10:20:44 AM(UTC)
HyperionAUT

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 12/19/2012(UTC)
Posts: 54
Location: Austria

ah!!! retracement trailing stop.... (the new exploration starts right now)

thanks for the hint with the turtles! Chandelier exit I´ll google that :D

have a nice WEEK

Users browsing this topic
Guest (Hidden)
2 Pages<12
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.