Gamestudio Links
Zorro Links
Newest Posts
folder management functions
by VoroneTZ. 04/17/24 06:52
lookback setting performance issue
by 7th_zorro. 04/16/24 03:08
zorro 64bit command line support
by 7th_zorro. 04/15/24 09:36
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:48
Zorro FIX plugin - Experimental
by flink. 04/14/24 07:46
LPDIRECT3DCUBETEXTUR
E9

by Ayumi. 04/12/24 11:00
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 04/11/24 14:56
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (7th_zorro), 429 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
11honza11, ccorrea, sakolin, rajesh7827, juergen_wue
19045 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
MACD trading #486545
09/04/22 16:28
09/04/22 16:28
Joined: Sep 2022
Posts: 13
Newark
U
udihamudi Offline OP
Newbie
udihamudi  Offline OP
Newbie
U

Joined: Sep 2022
Posts: 13
Newark
Hello all,

This is my very first post, I just found Zorro yesterday laugh downloaded and played a little, seems like great stuff. I Have a newbie question and excuse me if this was asked before and answered - is there MACD trading strategy (script) already? For futures / forex. I did not see anything with such content in the strategy folder.

Thanks! have a great weekend!

Re: MACD trading [Re: udihamudi] #486549
09/04/22 21:17
09/04/22 21:17
Joined: Aug 2022
Posts: 65
alun Offline
Junior Member
alun  Offline
Junior Member

Joined: Aug 2022
Posts: 65
I believe you can start with Workshop4.c

and then use MACD indicator to set you own rules for entry/exit https://zorro-project.com/manual/en/ta.htm

Re: MACD trading [Re: alun] #486550
09/04/22 22:22
09/04/22 22:22
Joined: Sep 2022
Posts: 13
Newark
U
udihamudi Offline OP
Newbie
udihamudi  Offline OP
Newbie
U

Joined: Sep 2022
Posts: 13
Newark
Thanks for the reply! I could not see file called Workshop4.c, only Worhshop_a reference in the above link you provided, where is this file?

Also, I did find the following in Zorro help at
https://zorro-trader.com/manual/en/macd.htm


// when the MACD Histogram goes above zero, buy long
if (crossOver(macdHist(12,26,9),constant(0)))
buyLong(0);
// sell when it goes below zero
if (crossUnder(macdHist(12,26,9),constant(0)))
sellLong(0);


But it doesn't compile, throwing error about macdHist cannot be found. Maybe it's in some external h file?

Re: MACD trading [Re: udihamudi] #486554
09/05/22 09:06
09/05/22 09:06
Joined: Aug 2022
Posts: 65
alun Offline
Junior Member
alun  Offline
Junior Member

Joined: Aug 2022
Posts: 65
Hey udihamudi,

Workshop4 code can be found here https://zorro-project.com/manual/en/tutorial_trade.htm

It should be distributed with Zorro if you downloaded the latest version.


I believe this MACD example that you're looking at is some outdated one.

There are no buyLong/sellLong functions in my Zorro 2.50

instead you're should be using something like:


Code
vars macd = series(MACD(Prices, 12, 26, 9));

if (crossOver(macd,0)) enterLong();
else if (crossUnder(macd,0)) exitLong();


With prices like in workshop 4.




Last edited by alun; 09/05/22 09:09.
Re: MACD trading [Re: udihamudi] #486557
09/05/22 09:55
09/05/22 09:55
Joined: Aug 2022
Posts: 65
alun Offline
Junior Member
alun  Offline
Junior Member

Joined: Aug 2022
Posts: 65
BTW I found this nice video on the MACD trading - https://www.youtube.com/watch?v=nmffSjdZbWQ

it suggest you use crossover of a macd and singnal lines as an enter signal and use 200 MA as a trend filter for long/short signals.

It's definitely not set in stone, but some ideas to try.

Re: MACD trading [Re: udihamudi] #486560
09/05/22 12:27
09/05/22 12:27
Joined: Sep 2022
Posts: 13
Newark
U
udihamudi Offline OP
Newbie
udihamudi  Offline OP
Newbie
U

Joined: Sep 2022
Posts: 13
Newark
Great input thanks, I have seen it and looks genuine, even the reading aloud is automated laugh

I have also found this script in github and backtested it, and the result are quite nice, upside of about %20 on EUR/USD 2021-2022-
https://github.com/grat001/5xcor/blob/master/5xcor_jema.c

Of course I would need to modify it for real life scenarios but good baseline showing we can use MACD in Zorro.

Have you had any success using MACD or other indicators in Zorro (or other platforms)?

Cheers


Last edited by udihamudi; 09/05/22 12:41.
Re: MACD trading [Re: udihamudi] #486561
09/05/22 13:39
09/05/22 13:39
Joined: Aug 2022
Posts: 65
alun Offline
Junior Member
alun  Offline
Junior Member

Joined: Aug 2022
Posts: 65
Nice, you probably need more data/pairs also do a reality check on a de-trended data before running it live.



Originally Posted by udihamudi


Have you had any success using MACD or other indicators in Zorro (or other platforms)?



No I haven't. At least explicitly - not sure if it's used in Z-systems, e.g. Z1 - if yes than this system seems to be successful.

The main problem with MACD that is't lagging - in fact it'd double lagging cause it applies MA to MA.

I'm not a big fan of indicator soups in general.

Also if you haven't seen this - nice article by jcl adding some insight on where the to look for grail system with more probability of finding it laugh

https://financial-hacker.com/please-send-me-a-trading-system/

Re: MACD trading [Re: udihamudi] #486565
09/05/22 17:06
09/05/22 17:06
Joined: Sep 2022
Posts: 13
Newark
U
udihamudi Offline OP
Newbie
udihamudi  Offline OP
Newbie
U

Joined: Sep 2022
Posts: 13
Newark
Interesting, I wonder if its possible really to "code" market inefficiencies, market model, data mining etc. in a consistent way for a fire-and-forget bot trading, seems like a lot of hand holding required(?) - vs indicator soup, which is probably easier to automate and train for auto trading (but obviously less profitable).

Have you tried automating these different approaches?

Last edited by udihamudi; 09/05/22 17:07.
Re: MACD trading [Re: udihamudi] #486567
09/05/22 21:53
09/05/22 21:53
Joined: Aug 2022
Posts: 65
alun Offline
Junior Member
alun  Offline
Junior Member

Joined: Aug 2022
Posts: 65
No I don't believe that such strategy exists TBH.

You can have an ideal unbiased WFO-optimised strategy but real-world Sharpe ratio that I usually see is about 1-1.5.

Meaning the ratio of CAGR vs Drawdown/Equity Volatility.

Also drawdown can persist for about 12 months even for the best strategies - so you need some patience to run them.

Strategies making 12% CAGR with reasonable max drawdowns (around 20%) are quite possible.

If you want more profitability that only goes for the cost of extra risks.

Selling options could be profitable IF done right. I've not yet got there myself.

I'm exploiting one ETF based strategy now live. Investing in cryptos long term.
Investing in some top signals of MQL5 with a small fraction of my portfolio.

And just started to play with Z-systems demo-only so far.


Of course that doesn't mean I'm right - that's just my personal way and experience.

You know, Larry Williams made 11376% in 1987 in a public contest with futures trading, turning $10k into $1147k in 1 year.
His max drawdown was over 50% during that contest.
That's an outstanding result, still - achievable.

https://distinct-radio-154.notion.site/Larry-Williams-87-5d242d40743044f880d73609eafa9069

Last edited by alun; 09/05/22 22:02.
Re: MACD trading [Re: udihamudi] #486568
09/06/22 01:53
09/06/22 01:53
Joined: Sep 2022
Posts: 13
Newark
U
udihamudi Offline OP
Newbie
udihamudi  Offline OP
Newbie
U

Joined: Sep 2022
Posts: 13
Newark
Which of the Zs are you trying if I may ask? how successful is it so far? when I ran the simulator for Z2 - result are just little better than break-even, including training .. not great frown . The MACD script I found did way better for similar span and same currency (EUR/USD) and I didn't even do any optimization yet.

This Z is concerning me a little, since its kinda black box, isn't that exactly what Zorro warning against in this hacker article laugh you cant's see the source code and obviously can't modify it. Are you comfortable enough to try it in real account?

My "dream" here is to chime in to various live data feeds, stock fundamentals feed etc., maybe throw in some indicators, candlestick/chart pattern, and see if I can I can write algo that will make sense of it all - but I don't know if its possible with Zorro. Use it for either forex or futures.

Outside of this I am playing a little with futures on live account, really little money for now, 80% upside so far but it's been really short time and I am spending way to much time in market research and manual monitoring ... this stuff should all be done by a nice little robot, it's crazy to spend so much time on this mechanical work and there is no reason not to automate if I can qualify my strategy

Have good week!

Page 1 of 3 1 2 3

Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1