|
Re: Moving Average crossover
[Re: gra9]
#478601
11/13/19 10:00
11/13/19 10:00
|
Joined: Aug 2019
Posts: 22
felixfx
Newbie
|
Newbie
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
gra9
OP
Guest
|
OP
Guest
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: Figurehunter]
#487086
01/14/23 21:36
01/14/23 21:36
|
Joined: Jun 2022
Posts: 6
BigW
Newbie
|
Newbie
Joined: Jun 2022
Posts: 6
|
[quote=Figurehunter]Alerts are possible with Zorro using email. I haven't measured the delay. These snippets are straight from the help file.
void main() { string To = "<me@myself.org>"; string From = "<zorro_alert@gmail.com>"; string Subject = "Zorro Message"; string Body = "Zorro has sent you a message!"; string Server = "smtps://smtp.gmail.com:465"; string User = "zorro_alert@gmail.com"; string Password = "zorros_password"; email(To,From,Subject,Body,Server,User,Password); }
I have set this up exactly as indicated in the help file and above in a new script page without any code ie to test sending emails separately from any trading script. The setup is using a new Google account set up for this purpose.
After running it I get the message: Email test compiling...ok, but no 0 or non zero returned. Does anyone have any experience using Google - or Outlook that works?
Following up I tried to set this up using Runbox instead of gmail and changed maun to a function which when runs returns 1 ie says email sent but still no email for some reason.
Last edited by BigW; 01/15/23 00:55.
|
|
|
|