|
email
Hi
I want to send an email with the trading levels for the new day does anyone know how i would set up the line of code so that it would only send at the start of a new trading day.
if (today_open==Time[0])
if (today_open==TimeCurrent())
I have written the message but just need to control the time it sends
is it possible to hard code in a specific time perhaps??
if (today_open==Time[0]) { if (BarChanged())
{
if (Email_DATA==true)SendMail("DOLLY Daily Trading Levels : "+Symbol()+"",
"DOLLY Daily Trading Levels : "+Symbol()+" Date = "+TimeToStr(TimeLocal(),TIME_DATE)+"\n"+"\n"
+"BUY AREA @ "+DoubleToStr (B1,Digits)+""
+" - TP @ "+DoubleToStr(B1+20*Point,Digits)+""
+" - SL @ "+DoubleToStr(B1-40*Point,Digits)+"\n"
+"BUY TARGET #1 @ "+DoubleToStr (B2,Digits)+""
+" - TP @ "+DoubleToStr(B2+10*Point,Digits)+""
+" - SL @ "+DoubleToStr(B2-20*Point,Digits)+"\n"
+"BUY TARGET #2 @ "+DoubleToStr (B3,Digits)+""
+" - TP @ "+DoubleToStr(B3+10*Point,Digits)+""
+" - SL @ "+DoubleToStr(B3-20*Point,Digits)+"\n"
+"\n"+"SELL AREA @ "+DoubleToStr (S1,Digits)+""
+" - TP @ "+DoubleToStr(S1-20*Point,Digits)+""
+" - SL @ "+DoubleToStr(S1+40*Point,Digits)+"\n"
+"SELL TARGET #1 @ "+DoubleToStr (S2,Digits)+""
+" - TP @ "+DoubleToStr(S2-10*Point,Digits)+""
+" - SL @ "+DoubleToStr(S2+20*Point,Digits)+"\n"
+"SELL TARGET #2 @ "+DoubleToStr (S3,Digits)+""
+" - TP @ "+DoubleToStr(S3-10*Point,Digits)+""
+" - SL @ "+DoubleToStr(S3+20*Point,Digits)+"");}}
The Message looks like this
DOLLY Daily Trading Levels : GBPUSD Date = 2007.04.03
BUY AREA @ 1.9789 - TP @ 1.9809 - SL @ 1.9749
BUY TARGET #1 @ 1.9809 - TP @ 1.9819 - SL @ 1.9789
BUY TARGET #2 @ 1.9819 - TP @ 1.9829 - SL @ 1.9799
SELL AREA @ 1.9749 - TP @ 1.9729 - SL @ 1.9789
SELL TARGET #1 @ 1.9729 - TP @ 1.9719 - SL @ 1.9749
SELL TARGET #2 @ 1.9719 - TP @ 1.9709 - SL @ 1.9739
Any ideas will be very appreciated. Thanks
cja
I have managed to hard code an adjustable time into the email so you can select when the email is sent, if you want to see how i did it look at the Dolly Graphics v GMT Email indicator on the 2nd post of the Dolly 2nd clone thread, i have also coded in an Alert email for the Doly levels which only gives one Alert per Bar, this stops false emails filling up your in box on every tick. I will post the Dolly indicator later today
cja
Last edited by cja; 04-03-2007 at 03:21 AM.
|