Is it possible to email quotes everyday at a certain time? For example every hour send an email stating the last price of MSFT.
Announcement
Collapse
No announcement yet.
Email Quotes
Collapse
X
-
RE: Reply to post 'Email Quotes'
How does one accomplish this?
Ron
-----Original Message-----
From: [email protected] [mailto:[email protected]]=20
Sent: Tuesday, June 10, 2003 9:29 AM
To: [email protected]
Subject: Reply to post 'Email Quotes'
Hello RNuckles,
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
czumwalt
I think something like the enclosed script may work (have not actually tested it in real time).
Note: In the script I have 5 symbols two which are REMmed out in case you are using a version of the software that allows for only 3 symbols in an efs.
Alex
PHP Code:function preMain() {
setPriceStudy(true);
setStudyTitle("email-alerts");
setShowCursorLabel(false)
setComputeOnClose();
}
function main() {
if (getBarState()==BARSTATE_NEWBAR && getHour(0) != getHour(-1)){
Alert.email("IBM",close(0,"IBM"));
Alert.email("MSFT",close(0,"MSFT"));
Alert.email("CSCO",close(0,"CSCO"));
//Alert.email("$SPX",close(0,"$SPX"));
//Alert.email("$INDU",close(0,"$INDU"));
}
return null;
}
Comment
-
Thanks for your help Alexis. I have tried to get this to work but it will not unless i remove the setComputeOnClose() function. However, when i do this it sends an email every tick. Is there a way around this like creating a variable that is only on for one tick and making a condition for the alert that the variable must be on in order to send the alert.
Comment
-
This may work. It's untested due to being after market hours, but in theory, it should do the trick. I would suggest putting this on a fast moving symbol, so the reset at xx:59:59 isn't missed. I still think there probably is a better way to do the reset of vEmailSent though.
PHP Code:function preMain() {
setPriceStudy(true);
setStudyTitle("Hourly Email Alerts");
setShowCursorLabel(false)
}
var vEmailSent = false;
var DateObject = new Date();
function main() {
var vCurrentHour = DateObject.getUTCHours();
var vCurrentMinute = DateObject.getUTCMinutes();
var vCurrentSecond = DateObject.getUTCSeconds();
if (vEmailSent == false) {
if (vCurrentHour == 15 || vCurrentHour == 16 || vCurrentHour == 17){
Alert.email("IBM",close(0,"IBM"));
Alert.email("MSFT",close(0,"MSFT"));
Alert.email("CSCO",close(0,"CSCO"));
//Alert.email("$SPX",close(0,"$SPX"));
//Alert.email("$INDU",close(0,"$INDU"));
vEmailSent = true;
}
}
if (vCurrentMinute == 59 && vCurrentSecond == 59 && vEmailSent == true) vEmailSent = false;
return null;
}
Attached FilesRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
I would think it might be easier to do the following:
PHP Code:var nLastHour = null;
.
.
.
Main(){
nMyHour = getHour();
if (nLastHour == null || nMyHour != nLastHour){
Alert.email("IBM",close(0,"IBM"));
nLastHour = nMyHour;
}
GarthGarth
Comment
-
Thanks Garth! Great solution. Attached is updated efs.Attached FilesRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
Re: many symbols
Originally posted by pj909
How many symbols are allowed in the newest version? Is there a way to process a large number of symbols from an external file or some other list?Regards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
This version has the following updates, and will only work with version 7.3 or greater.
- Send quotes on 5 symbols every hour in one email.
- Quotes are in the subject line
- You can now change symbols in the Edit Studies menu.Attached FilesRegards,
Jay F.
Product Manager
_____________________________________
Have a suggestion to improve our products?
Click Support --> Request a Feature in eSignal 11
Comment
-
For future traders, I think this version can be interesting :
instead of displaying ES #F you can set a different name ex:S&P
I also added a Active variable so you can set it on(1), or off(0) without being obliged to remove/reload the formula.
In order to go beyond the 5 quotes per formula, you just have to open 2-3-X adv charts and put this formula to each of the adv chart and changed the symbols...
I was thinking about a 30mn formula...Attached Files
Comment
Comment