Gamestudio Links
Zorro Links
Newest Posts
Chat Room for Zorro Programmers
by danatrader. 07/02/20 18:35
Locating unfreed memory
by Dooley. 07/02/20 14:39
A9
by Aku_Aku. 07/02/20 12:43
Sam Foster Sound | Experienced Game Composer for Hire
by titanicpiano14. 07/02/20 11:11
Help with code
by danatrader. 07/02/20 04:22
Grid Trading - dynamic
by danatrader. 07/01/20 17:15
Fuzzy Range
by AndrewAMD. 07/01/20 16:57
new macro: break_assets
by AndrewAMD. 07/01/20 01:01
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
8 registered members (3run, Zheka, deus777, kvm, Quad, Ayumi, alibaba, 20BN), 422 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
carolthesecond, Roger399, vrindger, XRaf, pchen90
18472 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Moving Average crossover #478595
11/12/19 17:00
11/12/19 17:00
Joined: Nov 2019
Posts: 2
G
gra9 Offline OP
Guest
gra9  Offline OP
Guest
G

Joined: Nov 2019
Posts: 2
Hi Guys,

I'm new here,

How would i write a simple strategy of buying on a moving average cross over(simple MA)

if 13/31 moving average crosses over on(5 minute chart) upside buy.
if 13/31 moving average crosses over on(5 minute chart) downside the sell.

Thank you.
Blessings.

Re: Moving Average crossover [Re: gra9] #478601
11/13/19 10:00
11/13/19 10:00
Joined: Aug 2019
Posts: 22
F
felixfx Offline
Newbie
felixfx  Offline
Newbie
F

Joined: Aug 2019
Posts: 22
function run()
{
set(PLOTNOW);
StartDate = 20100101;
EndDate = 20101231;
BarPeriod = 5;
vars close = series(priceClose());
vars sma13 = series(SMA(close, 13));
vars sma31 = series(SMA(close, 31));

if(crossOver(sma13, sma31)) enterLong();
if(crossUnder(sma13, sma31)) enterShort();

plot("sma13", sma13, MAIN, BLUE);
plot("sma31", sma31, 0, RED);
}

you'll find that a moving average crossover strategy loses money.

Last edited by felixfx; 11/13/19 10:05.
Re: Moving Average crossover [Re: felixfx] #478603
11/13/19 10:43
11/13/19 10:43
Joined: Nov 2019
Posts: 2
G
gra9 Offline OP
Guest
gra9  Offline OP
Guest
G

Joined: Nov 2019
Posts: 2
Thank you so much !!!
I currently use trade-ideas.com , whioh does not let me do custom moving averages like this , how do i get alerts on such signals in real time ?
Would love to have even a simple file generated in realtime , that will give me all these alerts say on a list of 30 stocks, or perhaps on the Nasdaq and New York.
Thank you !!! Blessings !!!

Last edited by gra9; 11/13/19 10:44.
Re: Moving Average crossover [Re: gra9] #478651
11/20/19 13:57
11/20/19 13:57
Joined: Aug 2019
Posts: 22
F
felixfx Offline
Newbie
felixfx  Offline
Newbie
F

Joined: Aug 2019
Posts: 22
I suppose you'll have to find a way to connect Zorro to trade-ideas.com's software, which I am completely unfamiliar with, and therefore would not even know whether they allow algorithmic trading.

I would suggest just sticking with Zorro begin backtesting ideas until you have developed a strategy that works.


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1