Stock Portfolio Organizer
The ultimate porfolio management solution.
Shares, Margin, CFD's, Futures and Forex
EOD and Realtime
Dividends and Trust Distributions
And Much More ....
WiseTrader Toolbox
#1 Selling Amibroker Plugin featuring:
Advanced Adaptive Indicators
Advanced Pattern Exploration
Neural Networks
And Much More ....
rsi for Amibroker (AFL)
Copy & Paste Friendly
Back
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | 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 (); { 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. |