Follow The Bouncing Pip - page 105

 

Google is our friend , but even after an hour of searching for MetaStock or

Tradestation ZigZag code source still nada , zilch , zero , nothing

Damn , where to get the code ?

Anybody around running Tradestation or MetaStock and wish to contribute code to the bouncing pip melting pot ?

Thanks

 

found this

hi guys....i jst found this code....but i dont no either this is the code that you all are looking for........i found it on the trade online metastock web

ZigZag Validity

{*********** Start of code *************}

{ZigZag validity by Spyros Raftopoulos

It validates the LAST LEG of the Zigzag indicator.

1=valid (not revisable), 0=invalid (revisable).

Do NOT use this indicator in systems.}

perc:=Input("Percent",0.2,100,10);

Z:=Zig(CLOSE,perc,%);

last:=ValueWhen(1,( Z > Ref(Z,-1) AND Ref(Z,-1) < Ref(Z,-2) )

OR

( Z Ref(Z,-2) ),

Ref(Z,-1));

pc:=(CLOSE-last) * 100 / last;

pc:= Abs(pc);

SD:=(z>Ref(z,-1) AND Ref(z,-1)>Ref(z,-2)) OR (z<Ref(z,-1) AND Ref(z,-

1)<Ref(z,-2));

res:=If(pc>=perc ,1,0);

If(Alert(res,2) AND SD,1,res)

{*********** End of code *************}

 

Thanks sypultraz,

something like two pages back I posted this code already

There is need to read through the previous posts in order to know what's going on with progress.

C'mon guys , keep up on reading

Sincerely,

ChampionFx

 

Money Management

nix:
I'll take a look.

BTW: here is my AutoLot management function. Maybe you can use it in your EA:

Money management will probably lower the return, but should also lower the drawdown. Thanks, MrPip for your hard work. It looks like an 8% drawdown when using dxTrade's method? (nonlagdot, qqe, bigbear rules)

16449.36 214.09 783.30 2024.62 7.76 2 0 3 6

What's the starting account balance - 10k or 100k?

I think this is a better way to do money management. It follows Van Tharp's money management. If you want an explanation, I can give it, or find a link :

double LotSize(int stopInPips, double accountRisk){

double lotMM = ( AccountFreeMargin() * (accountRisk/100) )/( MarketInfo(Symbol(),MODE_TICKVALUE) * stopInPips );

//This can be used with discretion

if (AccountIsMini) {

//Round to the nearest 10th - AccountIsMini needs to be a bool set at the top level

lotMM = MathFloor(lotMM*10)/10;

} else {

//Round to the nearest lot

lotMM = MathRound(lotMM);

//To be aggressive, use this one

//lotMM = MathCeil(lotMM);

}

if (lotMM < 0.1) lotMM = .1;

if (lotMM > 100) lotMM = 100;

return (lotMM);

}

Thanks,

burn0050

 
burn0050:
Money management will probably lower the return, but should also lower the drawdown. Thanks, MrPip for your hard work. It looks like an 8% drawdown when using dxTrade's method? (nonlagdot, qqe, bigbear rules)

16449.36 214.09 783.30 2024.62 7.76 2 0 3 6

What's the starting account balance - 10k or 100k?

I think this is a better way to do money management. It follows Van Tharp's money management. If you want an explanation, I can give it, or find a link :

double LotSize(int stopInPips, double accountRisk){

double lotMM = ( AccountFreeMargin() * (accountRisk/100) )/( MarketInfo(Symbol(),MODE_TICKVALUE) * stopInPips );

//This can be used with discretion

if (AccountIsMini) {

//Round to the nearest 10th - AccountIsMini needs to be a bool set at the top level

lotMM = MathFloor(lotMM*10)/10;

} else {

//Round to the nearest lot

lotMM = MathRound(lotMM);

//To be aggressive, use this one

//lotMM = MathCeil(lotMM);

}

if (lotMM < 0.1) lotMM = .1;

if (lotMM > 100) lotMM = 100;

return (lotMM);

}

Thanks,

burn0050

I added AutoLot to the EA and ran with the settings that produced the best results with profit at $16K. With MM the profit is now over $60K with 10% Account Balance per trade. Drawdown is higher but has more to do with trading 10% instead of 1 lot. Account size is $25K. Running with $10K account shows profit of $27125.

Most of the profit was from Aug 1 to Sept 7.

There is still something not right with the EA. It clearly misses some trades that appear to meet the rules. I printed out the values of the zigzag indicators and there are times since Sept 7 when a trade should have been placed. I will be working on this problem next.

Robert

 
MrPip:

Most of the profit was from Aug 1 to Sept 7.

[Aug - Sept] had a lot of sharp reversals followed by long trending periods, but the drawdown visible on your backtest is not bad. All trading systems experience drawdown periods once in a while.

 
ChampionFx:
Google is our friend , but even after an hour of searching for MetaStock or

Tradestation ZigZag code source still nada , zilch , zero , nothing

Damn , where to get the code ?

Anybody around running Tradestation or MetaStock and wish to contribute code to the bouncing pip melting pot ?

Thanks

I found a "ZigZag Percent indicator" for MT4, so I'll try to base both indicators on it since I can't seem to find the Tradestation or MetaStock code.

I'll work on this over the weekend.

 

Thanks

I just wanted to say thank you to everybody for their help in trying to make this system a virtual cash machine.

Keep up the good work and one day soon it will pay off in a big way.

again THANKS !!

 

Nix , ya da man !!!

I'm not coding guru , so if you find anything different in calculating of last leg in coding of ZigZag Percent indicator for MT4 or what this code is all about, that would be great and then we can go from there with some modification to it if possible.

Someone still may jump in here giving us basic code for Tradestation or MetaStock ZigZag indicator, we just may wait and see a little bit.

I'm all for a better ZigZag indicator that future EA could be based on.

Thanks to all of you for contributing in here, for your time and extra work.

Please , keep it up

Sincerely,

ChampionFx

 

Zigzag % Validity

Some explenation:

The problem that you are faced with, finding a validity for the zigzag indicator in MT4.0, is been "cracked" by us (ogeima and me) 6 weeks ago.

Based on that indicator I develloped a system that gave these results:

https://www.mql5.com/en/forum/trading_systems

scroll down on the page look and you see the charts.

Read also the text were I said that I was programming on this for the last 2 months.

On top of the charts you will see a name that says : (T_%_R) wich stands for: Trend procentual Reverse. In metastock I use the zigzag validity indicator to do the job for my system.

The challange was to bring this system and indicator to MT4.0.

Immediatly ogeima (the programmer for MT4--I do the programming for metastock) saw that the zigzag indicator in MT4 has not the same principle as the zigzag used by metastock.

So a new problem and a new challange.

For understandable reasons I can not share the system nore the indicator because I prommised ogeima to keep the MT4 indicator privat.

But I can give you some help or hint to solve the problem.

Forget about the zigzag indicator completely. Use logic thinking.

The zigzag validity in metastock is using the peak and trough to calculate.

Do the same for MT4.0. Look for tops and bottoms. Meaning: for a procentual drop of X % of a top and look for a X % raise from a bottom.

For example: (I gonna use round number to make it easy) Lets say that price went up and made a high at 1000. From there price starts to fall. Lets say that this indicator has the setting 2%. That means if it drops from 1000 to 980 that is the validity point and will show you a reading ( in metastock it it done in a binairy way -1 or +1) So in that case you will see the indicator drop to -1. Lets say that price moves a little bit lower to 950. If from there price starts to move up again with 2% (or 19points) the validity point will be at 969. If price crosses that level the indicator will jump to +1.

So to calculate this, one does not need a zigzag indicator.

Someone who is a bit of a programmer should crack this in a day.

We succeeded to bring this to MT4 and did even better. We made a Trinairy indicator. Because the binary indicator is only going to show you the point were price jump over that level. The trinairy indicator is giving also information if price jumps back and forworth over that level. So it has the reading +1,0,-1.

Some of you think that the topic I opend (follow the riding pip) is an idea that is bit stolen from this topic here or BB. But I did no such thing. It is actually a very weak version or one of the very first versions of the (T_%_R) system that I develloped in metastock and also without the % validitys of course. It was for that reason that I was capable of posting my "system" a day later after I posted here my first reaction.

Hopefully that explains a bit that I didn't copy anything or was inspired by this topic and hopefully it will help the programmers a bit in finding the solution for your problem.

Be awere that once you find the solution, it is no way near a holy grail indicator. It is a very usefull indicator but as any indicator only when it is used in a good set of rules.

My honesty obays me to say that I have doubts about the rules as you have them now. The action of trading is concentrated aroud the tops and the bottoms. Those are places when you can have occasionaly a very clean turn but tops and bottoms can be very messy. Even with the nescessary filtering they will make jump in and out and in and out to much before actually catching the real top and bottom. And after catching it there is still no garantee that price will move fast and in a clean way the direction it should ( to stay a way most of the times from trailing stops). Many times you will see a re-test of that bottom or top in the form of a bit lower second top and a bit higher second bottom.

So as I said to much of the trading action is concentrated around the tops and bottoms and the rest of the big move between a bottom and a top is not looked at. I believe it is safer to concentrate on what happens in between the top and the bottom.

But that is only an opinion and not a claim or a fact.

Regards...iGoR

PS. Don't see my doubts as beeing distructive but see it as help

PS2. The setting of the ZZ validity indicator in the image has a 0.5% value

Files:
Reason: