Alert email when vwap within 1 point


0
0

Thank you for your hard work and willingness to help. I have been trading for 20 years however I have not written any scripts. I am looking for an alert to trigger, with sound, email, and text on Think or Swim when price gets within 1pt of vwap on the /ES (s&p eminis). I read your post here https://www.hahn-tech.com/ans/alert-on-stock-touching-the-bottom-vwap/. It looks very close to what you have written here. Also if you can send me a link to how you implement a script into a Tos workspace I will be ecstatic.

Thank you again,

Eric Larby

Marked as spam
Posted by (Questions: 1, Answers: 0)
Asked on June 5, 2020 5:10 am
137 views
0
Private answer

I moved your question out of the "Frequently Asked Questions" topic and into the "Alerts and Notifications" topic. I also updated the title of your question to make it easier for other viewers to search for and find this solution.

First, let's get you up to speed on the various types of alerts you can build on Thinkorswim:

https://www.hahn-tech.com/ans/generate-alerts-from-macdstrat-chart-strategy/

That link will provide details explaining which sort of functionality is supported by each type of alert on Thinkorswim. Keep in mind that the code is only able to return true or false. How and where the alerts are sent are all up to how you configure the settings of your platform. Nothing in the code can say "send email". It's all handled by the platform through user settings.

Second, I see you asked about "how to implement the script". We have dozens of free tutorials that explain how to apply Thinkorswim code to various tools on the platform. All are listed by category right here on this website.

Now that we have addressed those details let's get to the code. Here I will use a reference to the VWAP study that comes with Thinkorswim as apposed to copying the entire code. The VWAP chart study code is very long so this will keep the code tidy and compact.

The following code checks if the current close is within 1 point of the VWAP plot:

plot scan = close > reference VWAP().VWAP - 1.0 and close < reference VWAP().VWAP + 1;

That code will use the default settings of the VWAP study. Which means it will reset the VWAP value at each new trading day and is set to work on an intraday time frame.

Marked as spam
Posted by (Questions: 37, Answers: 4118)
Answered on June 5, 2020 7:35 am