3 registered members (frutza, Quad, AndrewAMD),
385
guests, and 1
spider. |
Key:
Admin,
Global Mod,
Mod
|
|
|
MACD trading
#486545
09/04/22 16:28
09/04/22 16:28
|
Joined: Sep 2022
Posts: 13 Newark
udihamudi
OP
Newbie
|
OP
Newbie
Joined: Sep 2022
Posts: 13
Newark
|
Hello all, This is my very first post, I just found Zorro yesterday 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: alun]
#486550
09/04/22 22:22
09/04/22 22:22
|
Joined: Sep 2022
Posts: 13 Newark
udihamudi
OP
Newbie
|
OP
Newbie
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
Junior Member
|
Junior Member
Joined: Aug 2022
Posts: 65
|
Hey udihamudi, Workshop4 code can be found here https://zorro-project.com/manual/en/tutorial_trade.htmIt 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:
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
Junior Member
|
Junior Member
Joined: Aug 2022
Posts: 65
|
BTW I found this nice video on the MACD trading - https://www.youtube.com/watch?v=nmffSjdZbWQit 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
udihamudi
OP
Newbie
|
OP
Newbie
Joined: Sep 2022
Posts: 13
Newark
|
Great input thanks, I have seen it and looks genuine, even the reading aloud is automated 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.cOf 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
Junior Member
|
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.
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 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
udihamudi
OP
Newbie
|
OP
Newbie
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
Junior Member
|
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
udihamudi
OP
Newbie
|
OP
Newbie
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 . 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 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!
|
|
|
Re: MACD trading
[Re: udihamudi]
#486569
09/06/22 08:44
09/06/22 08:44
|
Joined: Aug 2022
Posts: 65
alun
Junior Member
|
Junior Member
Joined: Aug 2022
Posts: 65
|
I'm trying Z1 which is trend following portfolio of strategies. Backtest using 8 years data from Dukascopy currencies and CFD looked good. Trying live on a demo now. Current result +600$ in two trades it made so far Z2 is mean reversion. Which supposed to be coupled with Z1 and there is Z12 which does white (Zorro S only). Well I'm investing in signals for many years which are the same blackboxes - you just need to accept 100% deposit risk. And only put small fraction of your portfolio into this game. On the other side some of those signals making more 5000% over the span of few years. So I look at it as 50:1 risk reward investment. I'm looking at the Z1/Z2 systems the same way - I find their performance on backtests very good for my needs. I only hope there is no look ahead or selection bias. With signals there is definitely selection bias (survivorship bias) but the monitoring is of live trading not backtest so at leat the look-ahead is excluded. You can use Zorro for stocks there is nothing in relation to fundamentals analysis in its standard toolset. But you can load/process the data in Zorro manually. Best luck with your futures stategy.
|
|
|
Re: MACD trading
[Re: udihamudi]
#486571
09/06/22 10:04
09/06/22 10:04
|
Joined: Aug 2022
Posts: 65
alun
Junior Member
|
Junior Member
Joined: Aug 2022
Posts: 65
|
|
|
|
Re: MACD trading
[Re: udihamudi]
#486584
09/07/22 15:33
09/07/22 15:33
|
Joined: Aug 2022
Posts: 65
alun
Junior Member
|
Junior Member
Joined: Aug 2022
Posts: 65
|
Not sure about Ameritrade, Z1 trades mainly Forex and CFD based. I doubt Ameritrade gives you CFD as you'd rather have normal stocks and futures. Yes ZSystems are documented here https://zorro-project.com/manual/en/zsystems.htm
|
|
|
Re: MACD trading
[Re: udihamudi]
#486611
09/09/22 20:12
09/09/22 20:12
|
Joined: Sep 2022
Posts: 13 Newark
udihamudi
OP
Newbie
|
OP
Newbie
Joined: Sep 2022
Posts: 13
Newark
|
Does the free zorro allow to send orders to Oanda or just get historic data? Can it subscribe to real time market data from Oanda? Is all this documented per broker Thanks!!
Last edited by udihamudi; 09/09/22 20:13.
|
|
|
Re: MACD trading
[Re: udihamudi]
#486612
09/09/22 20:17
09/09/22 20:17
|
Joined: Feb 2017
Posts: 1,725 Chicago
AndrewAMD
Serious User
|
Serious User
Joined: Feb 2017
Posts: 1,725
Chicago
|
Does the free zorro allow to send orders to Oanda or just get historic data? Can it subscribe to real time market data from Oanda? Yes, yes, and yes.
|
|
|
|