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

Notification

Icon
Error

2 Pages12>
Options
Go to last post Go to first unread
HyperionAUT  
#1 Posted : Tuesday, January 8, 2013 2:24:28 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

Hi! I apologies that I am really spamming the forum the last days. Okay here it is, a very (for me) difficult task. I want to use my all the ideas around to combine it to a system and test it in the system tester. I could program it with a lot of help from WABBIT! The experts are working, the conditions and so on. But I have no clue how to make this working in the system tester.

When I see the chart, there are the green dots for BUY Signals and every DOT is a NEW BUY signal (red dots for short the stock). So at least, maybe 10 times bought the stock, that’s fine! And in the end there is one EXIT Sign. All position should be sold at this point. If you look at the chart it is very clear and easy to follow. Yeah, I know where to go but I have no clue how to get there.

When tested a few stocks, in trend markets is seems to be really great. But, yeah – how can I back test this (program code for system tester..). It’s not the work I do not want to do, it is very difficult because I have not an programmers mind.

Just as an Idea the Chart of: Bank of America. By now I have 2 Templates, that was easier to do. Because I also dont know how to get the code (conditions must be true, and so on... ) into ONE "System" programmed.

So: first short... during 2011, than... long... about beginning 2012 : -)
Looks good to me!

UserPostedImage

UserPostedImage

So, I tried my best. Important to know, I am USING 2x Latches for one chart (for LONG as example). So one is producing the green DOTS for entering (and with the SAR function) it creates re-enter positions. So the "exit" for re-entering are not shown in the Charts. But thats how the many dots are generated.

And the 2nd LATCH is for the FINAL exit sign. So, here is only tested, that if a condition is true (like 2 moving averages but the BUY signal is not show), so the system is IN the trade, and need only ONE EXIT :- ))) (no the MA crossovers are never traded, but needed for the exit condition in the end).

Also I have (for strong markets + gap ups) a special buy signal, those violet dots. If the close is above the last 10 days high and (... dont know?).. the SAR function is not gernerating an (exit) and re-entering position, this is why this HHL () function is in the expert advisor as SYMBOL. here is NO latch function used.

I don’t know if it is possible to make it “an automatic” system, when there are 2 different formula bases used. In the chart it is easy, because I CAN INTERPRET it the way I need it. But I haven’t figured it out how to write this, that in system tester the computer is buying really 10 times, and with one SELL all positions are closed (all 10 sold).

UserPostedImage

So finally to say it in easy words. "I know what to do when I see this chart, when to buy and when to sell or rebuy". It is logical for me, when I SEE IT with my eyes.

After 3 Stocks backtesting by hand, ... it is too much to do and not reliable. So thats why I am asking if someone can program this "logic" into a system tester - system that I can test it, if it is really good or not?

When I open different stocks, it looks quite good in trend markets. So I believe it is really usefull. The idea behind is, that every time when a buy signal ocurrs, the stock is bought with the leverage of 10 via certificate.

Stop-Loss are 3% blow the support zone, see the little horizontal lines.

Okay, time for beer, its to heavy, my brain starts to ache!

Thx Clemens.

HyperionAUT  
#2 Posted : Tuesday, January 8, 2013 2:29:47 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

Yes, and a lot of code is from Jose Silva! Latch-Function from this forum and so on. Nothing here is made up by me.

X:-D

wabbit  
#3 Posted : Tuesday, January 8, 2013 3:56:26 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)
Post all of your codes as used in all of your Expert Advisor components, and we will see if we can get them together into a composite signal generation system. wabbit [:D]
HyperionAUT  
#4 Posted : Tuesday, January 8, 2013 4:17:36 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

This is saved as 2 seperate indicators:

a) MY_TRADING_SYSTEM_2

mySAR:=SAR(0.075, 0.75);

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

Fml( "Bull Power/Bear Power Histogram +") > 0;

LX:= O < mySAR;

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

Fml( "Bull Power/Bear Power Histogram -") < 0;

SX:= O > mySAR;

{the latch}

ExtFml("ForumEquis.Latch", LE, LX, SE, SX);


b) MY_TRADING_SYSTEM_3

mySAR:=SAR(0.075, 0.75);


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

Fml( "Bull Power/Bear Power Histogram +") > 0;

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

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

Fml( "Bull Power/Bear Power Histogram -") < 0;

SX:= H >= (Mov(Mov(O,50,W)+( Mov(O,50,W)*(2.0/100)),5,W));

{the latch}

ExtFml("ForumEquis.Latch", LE, LX, SE, SX);

####### END of INDICATORs ################

EXPERT Advisor for LONG Trades (this is only for the „timeline“ green, red, blue..)

Bullish:

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

Fml( "Bull Power/Bear Power Histogram +") > 0

Bearish:

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

Symbols in the LONG expert:

reBUY Long (green dots)

Z:= Fml( "MY_TRADING_SYSTEM_2");

Z=1 AND Ref(Z,-1)<>1;

HHV Long 2nd BUY (violet dots)

x:=1;

type:=1;

depth:=1;

pds:=20;

xHi:=If(x=1,H,C);

xLo:=If(x=1,L,C);

Hi:=(HHV(xHi,pds-1)>xHi)>Ref(HHV(xHi,pds-1)>xHi,-1);

HiVal1:=ValueWhen(1,Hi,Ref(xHi,-1));

Lo:=(LLV(xLo,pds-1)<xLo)>Ref(LLV(xLo,pds-1)<xLo,-1);

LoVal1:=ValueWhen(1,Lo,Ref(xLo,-1));

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

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

supp:=ValueWhen(1,Lo,Ref(xLo,-1));

res:=ValueWhen(1,Hi,Ref(xHi,-1));

comb:=If(BarsSince(Hi)<BarsSince(Lo),res,supp);

suppH:=Trough(1,xLo,depth);

supp:=If(type=1,supp, suppH);

If(C > res, 1,0) AND L > HHV(Ref(H, -1),5);

++ maybe here is not all needed, like combo and so.. i just reduced the code from another "script" until it fitted .. maybe only the half is needed and produces the same? ++

EXIT (blue EXIT sign)

{LongExit Symbol}

Z:=Fml("MY_TRADING_SYSTEM_3");

Z<>1 AND Ref(Z,-1)=1;

HyperionAUT  
#5 Posted : Tuesday, January 8, 2013 4:19:55 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

#### Here the SELL SHORT EXPERT Advisor Codes, (and Symbols below):

Bullish (for the timeline below chart):

H >= (Mov(Mov(O,50,W)-( Mov(O,50,W)*(2.0/100)),5,W))

Bearish:

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

Fml( "Bull Power/Bear Power Histogram -") < 0

Symbols:

reSell-Short (red dots)

{ShortEntry Symbol}

Z:=Fml("MY_TRADING_SYSTEM_2");

Z=-1 AND Ref(Z,-1)<>-1;

LLV Short-re-short (violet dots)

x:=1;

type:=1;

depth:=1;

pds:=20;

xHi:=If(x=1,H,C);

xLo:=If(x=1,L,C);

Hi:=(HHV(xHi,pds-1)>xHi)>Ref(HHV(xHi,pds-1)>xHi,-1);

HiVal1:=ValueWhen(1,Hi,Ref(xHi,-1));

Lo:=(LLV(xLo,pds-1)<xLo)>Ref(LLV(xLo,pds-1)<xLo,-1);

LoVal1:=ValueWhen(1,Lo,Ref(xLo,-1));

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

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

supp:=ValueWhen(1,Lo,Ref(xLo,-1));

res:=ValueWhen(1,Hi,Ref(xHi,-1));

comb:=If(BarsSince(Hi)<BarsSince(Lo),res,supp);

suppH:=Trough(1,xLo,depth);

supp:=If(type=1,supp, suppH);

If(C < supp, 1,0) AND H < LLV(Ref(L, -1),5);

++ maybe here is not all needed, like combo and so.. i just reduced the code from another "script" until it fitted .. maybe only the half is needed and produces the same? ++

EXIT (blue EXIT Sign)

{ShortExit Symbol}

Z:=Fml("MY_TRADING_SYSTEM_3");

Z<>-1 AND Ref(Z,-1)=-1;

HyperionAUT  
#6 Posted : Tuesday, January 8, 2013 4:37:14 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

Here the Code fort the „FML Bull_Bear..“ which is used as well:

Bull Power/Bear Power Histogram +

peri:=20;

r1:=If(Ref(C,-1)<O,Max(O-Ref(C,-1),H-L),H-L);

r2:=If(Ref(C,-1)>O,Max(Ref(C,-1)-O,H-L),H-L);

bull:=If(C=O,

If(H-C=C-L,

If(Ref(C,-1)>O,

Max(H-O,C-L),

r1),

If(H-C>C-L,

If(Ref(C,-1)<O,

Max(H-Ref(C,-1),C-L),

H-O),

r1)),

If(C<O,

If(Ref(C,-1)<O,

Max(H-Ref(C,-1),C-L),

Max(H-O,C-L)),

r1));

bear:=If(C=O,

If(H-C=C-L,

If(Ref(C,-1)<O,

Max(O-L,H-C),

r2),

If(H-C>C-L,

r2,

If(Ref(C,-1)>O,

Max(Ref(C,-1)-L,H-C),

O-L))),

If(C<O,

r2,

If(Ref(C,-1)>O,

Max(Ref(C,-1)-L,H-C),

Max(O-L,H-C))));

If(Mov(bull-bear,peri,S) > 0, Mov(bull-bear,peri,S), 0)

Bull Power/Bear Power Histogram –

peri:=20;

r1:=If(Ref(C,-1)<O,Max(O-Ref(C,-1),H-L),H-L);

r2:=If(Ref(C,-1)>O,Max(Ref(C,-1)-O,H-L),H-L);

bull:=If(C=O,

If(H-C=C-L,

If(Ref(C,-1)>O,

Max(H-O,C-L),

r1),

If(H-C>C-L,

If(Ref(C,-1)<O,

Max(H-Ref(C,-1),C-L),

H-O),

r1)),

If(C<O,

If(Ref(C,-1)<O,

Max(H-Ref(C,-1),C-L),

Max(H-O,C-L)),

r1));

bear:=If(C=O,

If(H-C=C-L,

If(Ref(C,-1)<O,

Max(O-L,H-C),

r2),

If(H-C>C-L,

r2,

If(Ref(C,-1)>O,

Max(Ref(C,-1)-L,H-C),

O-L))),

If(C<O,

r2,

If(Ref(C,-1)>O,

Max(Ref(C,-1)-L,H-C),

Max(O-L,H-C))));

If(Mov(bull-bear,peri,S) < 0, Mov(bull-bear,peri,S), 0)

That´s all, and somehow working.. but... he he.. Wabbit again, it´s still your code. And when do you sleep, man?

wabbit  
#7 Posted : Tuesday, January 8, 2013 4:45:09 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)
It's becoming very obvious to me that you've not read the MS User Manual very thoroughly and have not done or understood the exercises in the formula primer.

Instead of making multiple indicators each containing very similar code, you should make only one indicator and make any minor adjustments as required, e.g. for the Bull/Bear Power histogram:

Code:

peri:=20;

r1:=If(Ref(C,-1)<O,Max(O-Ref(C,-1),H-L),H-L);
r2:=If(Ref(C,-1)>O,Max(Ref(C,-1)-O,H-L),H-L);

bull:=If(C=O,
If(H-C=C-L,
If(Ref(C,-1)>O,
Max(H-O,C-L),
r1),
If(H-C>C-L,
If(Ref(C,-1)<O,
Max(H-Ref(C,-1),C-L),
H-O),
r1)),
If(C<O,
If(Ref(C,-1)<O,
Max(H-Ref(C,-1),C-L),
Max(H-O,C-L)),
r1));

bear:=If(C=O,
If(H-C=C-L,
If(Ref(C,-1)<O,
Max(O-L,H-C),
r2),
If(H-C>C-L,
r2,
If(Ref(C,-1)>O,
Max(Ref(C,-1)-L,H-C),
O-L))),
If(C<O,
r2,
If(Ref(C,-1)>O,
Max(Ref(C,-1)-L,H-C),
Max(O-L,H-C))));

ma:=Mov(bull-bear,peri,S);

gtz:=(ma>0)*ma;
ltz:=(ma<0)*ma;

{plot}
gtz; {colour me green histogram}
ltz; {colour me red histogram}


If you want to know the value of the histogram in another indicator, you simply use the FmlVar() function to call the "ma" variable, and test against the returned value.... no need for separate indicator formulae.


wabbit [:D]

HyperionAUT  
#8 Posted : Tuesday, January 8, 2013 4:46:12 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

The are added now! Plz look at all now again, ´cause I edit some and changed or wrote a smal commentary. So .. :- )

Hint: Dont get irritated due to the chart, for Long I uses the

(Mov(Mov(O,50,W) - ( Mov(O,50,W)*(2.0/100)),5,W));
(the black line).

and for Short:

(Mov(Mov(O,50,W) + (Mov(O,50,W)*(2.0/100)),5,W));
(the black line).

If you put them near beside... in photoshop or paint, I did it. *no comment* : ))

One little EXIT SUGGESTION: If you look at the chart the exit is sometimes quite "far away". It could be good to use the 2nd previous low (support linie) or maybe the latest lowest-low (support line) in the long trend * 0.97 so that the stock has some "air to breath". So it is not sold all time when the market goes up/down in the normal range.

Or SL with ATR? * 1.25

At least in the REAL TRADING I will raise the SL all time, after a new buy, like a kind of trailing stop. But for the back test, I guess the "Crossing the shiftet 50 Wma (2.0)" will have good enough results.

I have no clue how to describe it better.

A good exit strategy... open for any helpful advise! Maybe a total different strategie (idea). Feel free... :- D

+++ END +++

wabbit  
#9 Posted : Tuesday, January 8, 2013 6:15:37 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:
A good exit strategy... open for any helpful advise! Maybe a total different strategie (idea). Feel free...


So... why am I spending my free time cleaning up your code if you don't know if this strategy is your trading logic or not??

As you're writing your codes, making LONG trades independent of SHORT trades, or at least that's the way I am reading it, then you're going to run into some bias issues when both LONG and SHORT trade signals can be generated on the same bar. You could (an probably will) run into the issue when you have both LONG and SHORT positions open simultaneously.

Here's my first effort to clean up what I think is your trading logic:

Code:

{HyperionAUT}

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;

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}
LX:= 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;

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}
SX:= 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;


In the Expert Advisor, plot symbols:

Code:

{LONG EXIT}
FmlVar("HyperionAUT","LX");

{SHORT EXIT}
FmlVar("HyperionAUT","SX");

{LONG ENTRY}
FmlVar("HyperionAUT","LE");

{SHORT ENTRY}
FmlVar("HyperionAUT","SE");



That's about enough for now.


wabbit [:D]
HyperionAUT  
#10 Posted : Tuesday, January 8, 2013 6:27:30 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

Hi again!

I "guess" I know what you mean, but... hmm... maybe I do not see it, or I am right.

Because of the Trend, I mean the moving averages.

It can not happen that the Mov 5 is > 13 and 21 > 38 AND

that 5 < 13 and 21 < 38 simultaniously.

I know this is clear to you as well, i thought this is the trend filter?!?!?

These are the condictions (if true) that the system is a LONG Market out there,

or it "must" be a Short market (if all MA are smaller..).

Of course when it is only a small correction, than the system says SELL SHORT into "the bull trend". But, ... hmm... the exit is will be the last top, and due to Moneymanagement, like 2% risk of the capital, when i will be kicked out at this point it is okay. Of course it is a loss, but .. yeah.

So of course it is not your task to do this, i thought it will work.

But maybe I am "blind" and did not see it?

So, again, if you copy the chart and put them next to each other, it is very close, from short, then EXIT and into long.

there was never a LONG during a lasting short periode?

OKAY now i TRY it.

Thank you! I am confused again, I just copy + paste.

Thanks man. I will purchase for the next beer, .. but I live in Austria.

May I can do you a favor?

HyperionAUT  
#11 Posted : Tuesday, January 8, 2013 6:36:19 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

I guess now you ´ll kill me.

I copy this as an "indicator" right? all of the code.

the expert code is clear to me.

BUT :

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

There seems to be "something missing" at my PC... if it is just a link to the B/B Power formula. what is the , "ma" good for. I dont know how to link it : (

Or is this a second "include indicator".

I need this Code as well (then..) :- (

*find some cover, incoooominngg!!!*

wabbit  
#12 Posted : Tuesday, January 8, 2013 6:51:23 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)
Your "trend filter" is not defined as you think it is... at the moment you have a condition that if "Mov 5 is > 13 and 21 > 38" (with some additional criteria) then you can go long, but you've not included the negation of this filter in your exit criteria, so if a LE trigger is met and then the "trend filter" turns down, you could trigger a SE without exiting the LONG trade, because your LX criteria doesn't include this condition.

If cutting and pasting other people's code was all that was required to trade, then we'd all be rich... but unfortunately it takes a lot more than that, and if you're going to be using other people's code you'd better be sure you know exactly how it works as it's your money which is at risk, not theirs. If your signals are going to be generated by a machine, then you'd better damn sure the machine knows how to handle every possible permutation of combined signals; unlike you, computers cannot go bankrupt.



wabbit [:D]

HyperionAUT  
#13 Posted : Tuesday, January 8, 2013 7:00:19 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

Hmm.. but look at this, when i just SWITCH the Expert, from "Long" to the "Short" Setup.

UserPostedImage

This is Nasdaq, Today, Intraday

(OKAY NOW I SEE IT ON MY OWN!!!! DAMNED, you are right!?)

it is just switching all the time. thats what i am looking for.

and by now, i could not "try" your great work, i dont now how to implement it.

; (

wabbit  
#14 Posted : Tuesday, January 8, 2013 7:03:34 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:
BullBearPower:=FmlVar("Bull Power/Bear Power Histogram","ma");

There seems to be "something missing" at my PC... if it is just a link to the B/B Power formula. what is the , "ma" good for. I dont know how to link it

http://forum.equis.com/forums/permalink/40514/40523/ShowThread.aspx#40523
HyperionAUT  
#15 Posted : Tuesday, January 8, 2013 7:33:31 PM(UTC)
HyperionAUT

Rank: Advanced Member

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

Okay perfect! Thanks man! It looks really great, and I like it.

Finally, the System Tester (when i plot the results on the chart), is NOT trading every single buy dot, like 10 times buy and exit all 10 positions ONCE. Vice Versa for the short selling.

BUT i can use it much better for backtesting via hand.

: )

I will never get my mind up for program stuff like you do! Respect!

HyperionAUT  
#16 Posted : Thursday, January 10, 2013 9:02:56 AM(UTC)
HyperionAUT

Rank: Advanced Member

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

Hi Wabbit, and all other!

Okay, now after a lot of hours sleep I finally know .. : D

As a Trend filter, so that there will no short position be opend until a 2 year bull market (for example) the:

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

This "is the high-priority" filter.

At least, the "idea" of trading long and short, like a flip flop system, is NOT what I want, in the end. Only long when there is a bullmarket, and short in the bearish markets.

I try and post the solution, when i figured it out how to modify the code.

So hold on I´ll do it and if i really have no idea, may i ask here again how to implement this "condiction."

Vice versa for the long (short) positions.

Mov(H, 90, W) < Mov(L, 200, E) only if this codiction is true, it is allowed to build up short positions. And then no "spontanious 3 week up-correct" will be entered a long position.

so THIS is at least the filter I was talking about.. : -))

Yes, and I see it in the expert advisor, the buy and sell dots, of course a few (about 3 months) during the start of the rally, the system is not investet. but thats okay. but when it enters long or short, there was in the past at least a few month (or years) the trend going on. Thats nice.

AND: oh my goddddd I write as much as my girlfriend if i had one : )

it looks good that the "later entry" seems quite close happen if a declining trendline was broken, so after a few months.

As well then is the DOW Theorie fullfiled. higher highs and higher lows.. ah whatever!

Clemens

Screenshot what I liked to filter out ... so this is only the LONG expert Advisor.

UserPostedImage

UserPostedImage

Here all both "experts" in the EXPERT Advisor Code as Wabbit did it for me.

UserPostedImage

And with the Trendlines, which are "easy" to draw after a lot of months, it looks really good to me. Suggestions? (Like: go and get a real job, nope!) : - ))

HyperionAUT  
#17 Posted : Thursday, January 10, 2013 9:28:23 AM(UTC)
HyperionAUT

Rank: Advanced Member

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

Okay, that was easy : - ))

Modify at the expert advisor :

{LONG ENTRY}
When(Mov(L, 90, W), >, Mov(H, 200, E)) AND
FmlVar("HyperionAUT","LE");


{SHORT ENTRY}
When(Mov(H, 90, W), <, Mov(L, 200, E)) AND
FmlVar("HyperionAUT","SE");

UserPostedImage

HyperionAUT  
#18 Posted : Thursday, January 10, 2013 9:56:53 AM(UTC)
HyperionAUT

Rank: Advanced Member

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

UserPostedImage
HyperionAUT  
#19 Posted : Thursday, January 10, 2013 10:18:51 AM(UTC)
HyperionAUT

Rank: Advanced Member

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

Okay System Tester is not working.. I have NO CLUE how he calculates what-ever-kind-of signals?!!?!

At least, plot on chart is NEVER this what I was looking for with this super expert advisor system?!

Any help?

wabbit  
#20 Posted : Thursday, January 10, 2013 4:35:29 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)
What do you mean by "not working" Does the EST not take any trades? Does it take too many trades? Does it take trades when the conditions aren't right? Post an image with the EST trades versus the expert symbols, and also all of the codes used in the expert and the EST.

And stop using When() Do the exercises in the Equis Formula Primer to see that is deprecated and not required.


wabbit [:D]

Users browsing this topic
Guest (Hidden)
2 Pages12>
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.