Vous êtes sur la page 1sur 3

If you have access to Net on phone then go for "PushBullet"

Its free and very fast.


I have tested it and signals flashes almost immediately on
phone(Iphone/Android)+DeskTop(Chrome)
If you need assistance on how to configure then here's the process:

1)Download Pushbullet Android/IOS App according to your


smartphone device where you to receive push notification from
Amibroker Software. If you wanna recieve alerts in your Desktop or
Browser or to receive alerts from someone else Pushbullet channel
you can download the Browser extention from the link here

2)Sign in with Pushbullet using your Google Login.

3)Once Signed in click over your profile pic and goto account
settings. Now copy the Access Token which is unique code to
communicate with your device and keep it safe.

4)Now make sure that your Trading System supports Buy/Sell


Variables minimum to pass Buy/Sell Alerts. If you need to send
Short/Cover/any other variables then you need to build your own
custom code according to your requirements. In this example we
focused only on alerting with simple Buy/Sell Variable.

5)Copy the AFL code and save it as pushbullet.afl code in your //


Amibroker//Formulas//system folder

Code:
_SECTION_BEGIN("PushBullet");

EnableScript("VBScript");

<%

Public Sub pushbullet(Message_Text)


Dim Message

'Your Message
Message = Message_Text

Dim objXmlHttpMain , URL

strJSONToSend = "{""type"": ""note"", ""title"":


""Alert"", ""body"":""" &Message_Text&"""}"
URL="https://api.pushbullet.com/v2/pushes"
Set objXmlHttpMain = CreateObject("Msxml2.ServerXMLHTTP")
on error resume next
objXmlHttpMain.open "POST",URL, False
objXmlHttpMain.setRequestHeader "Authorization", "Bearer
xxxxxxxxxxxxxxxxxxx"
objXmlHttpMain.setRequestHeader "Content-Type",
"application/json"

objXmlHttpMain.send strJSONToSend

set objJSONDoc = nothing


set objResult = nothing

'Store response
'msgbox(objXmlHttpMain.responseText)
'response.Write (objXmlHttpMain.responseText)
alert("Hi")
End Sub

%>

pb = GetScriptObject();

if
(LastValue(ValueWhen(Ref(Buy,-1),BarIndex())==BarIndex())
AND StaticVarGet(Name()+GetChartID()+"buyAlert")==0 )
{
pb.PushBullet("Buy Alert in " +Name() + " :
BuyPrice Value is " + BuyPrice + " Time " +
TimeNum());
StaticVarSet(Name()+ GetChartID() + "buyAlertBar",
LastValue(TimeNum()));
}

if (LastValue(TimeNum()) == StaticVarGet(Name()
+GetChartID()+"buyAlertBar"))

StaticVarSet(Name()+GetChartID()+"buyAlert",1); //
alert was triggered, no more alerts on this bar
else
StaticVarSet(Name()+GetChartID()+"buyAlert",0); //
new bar formed, and alerts can be trigered.

if
(LastValue(ValueWhen(Ref(Sell,-1),BarIndex())==BarIndex()
) AND StaticVarGet(Name()+GetChartID()+"buyAlert")==0 )
{
pb.PushBullet("Sell Alert in " +Name() + " :
SellPrice Value is " + SellPrice + " Time " +
TimeNum());
StaticVarSet(Name()+ GetChartID() + "sellAlertBar",
LastValue(TimeNum()));
}

if (LastValue(TimeNum()) == StaticVarGet(Name()
+GetChartID()+"sellAlertBar"))

StaticVarSet(Name()+GetChartID()+"sellAlert",1); //
alert was triggered, no more alerts on this bar
else
StaticVarSet(Name()+GetChartID()+"sellAlert",0); //
new bar formed, and alerts can be trigered.

_SECTION_END();
6)Now Replace xxxxxxxxxxxxxx in line 25 with your Secure Access
token

7)Now Drag and Drop the pushbullet.afl code to your Trading


System Charts which contains Buy/Sell Variables. Note you have to
do a drag and drop to your existing trading system annd not to
insert the afl code

8)Bingo you are done now get alerts to your mobile/desktop/laptop


devices(one or multiple devices) and stay connected with your
trading system even you are out of your trading system

-All credits to original poster


I have just copy pasted from Net and using it.

Vous aimerez peut-être aussi