Gamestudio Links
Zorro Links
Newest Posts
Bmap creation - wrong Alpha values
by txesmi. 12/11/19 12:43
A9
by preacherX. 12/11/19 11:01
Error Message 010: invalid stops
by Volker. 12/11/19 08:25
AssetFix & Assets.csv
by MatPed. 12/11/19 07:03
How to handle profit in a TMF during training
by StefanCGN. 12/09/19 20:09
Simulate complex commission costs [Test]
by AndrewAMD. 12/09/19 13:52
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
6 registered members (3run, AndrewAMD, Volker, Quad, PabloMF, 1 invisible), 802 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
timW, PabloMF, deepscreener, wzschultz, Alit
18342 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: 19
F
felixfx Offline
Newbie
felixfx  Offline
Newbie
F

Joined: Aug 2019
Posts: 19
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: 19
F
felixfx Offline
Newbie
felixfx  Offline
Newbie
F

Joined: Aug 2019
Posts: 19
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.


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