MW ❤ Telegram Bots (and vice versa)

Spin

Well-known member
Joined
May 22, 2019
Posts
510
Likes
216
Hello fellow fans of the coolest trading platform out there :D

Another day, another interesting MW-coding project: I succeeded in having MW send messages to Telegram.

The RangeBreakOut-Study is now 'Telegram-able' and will send messages to a Telegram channel upon a BUY / SELL or TP hit:


662

664


Of course, many many more possible uses (in different Studies or Strategies) for such a cool feature can be imagined.
What would you like to see ? :)
 
Last edited:
How to code it and make it workable ?

How to send such signal to telegram group on daily or weekly time frame.


Say for example, I draw a line for support / resistance and when daily bar hit either of it, signal to be sent on Teelgram Group or Channel, how to do it ?
Thanks
 
Last edited:
Well, it needs to be custom-coded per Study, since neither the SDK nor MW as a whole allow 'link condition(s) to Telegram-bot'. Might be a cool feature, but we're not there yet :)

So what I do is this:
  • put a function for the bot in a MW-standard or custom-coded Study (so the Study receives a 'tongue' and can speak, so to speak ?)
  • define which condition(s) need to be met for the bot to send a message
  • put calls to that functions in the right place(s)
  • create a Telegram-bot and link it to my code
  • test the whole shabang
  • [repeat]
For your case specifically, @John999, I would need to code a Study that allows you to set the level for those S/R lines in the menu, and add code to let you pick a time for the checking of the conditions (e.g.: every night at 2200 CET) and link it all up to a newly-created bot.

Now, you could also add alerts to your MW-chart and have an email sent when hit / crossed / ..., but I suppose you already knew that ?
 
Thanks Spin for your feedback. Email alert, I know but still not familiar with updating on Telegram Group or Channel.
 
Top