Comments (4)
May I see your code?
from tradingview-free-webhook-alerts.
# =====================================
# CODE
# =====================================
flag = True
last_message = None
url_regex = "https?://([A-Za-z_0-9.-]+).*"
...
def handler(pd: "pipedream"):
# extract data from previous steps
global flag
global last_message
content = pd.steps["trigger"]["event"]["body"]["text"]
from_email = pd.steps["trigger"]["event"]["headers"]["from"]["value"][0]["address"]
now = datetime.utcnow()
current_time = now.strftime("%H:%M")
today_0800pm_UTC = datetime.strptime("20:00", "%H:%M").strftime("%H:%M")
today_0230pm_UTC = datetime.strptime("14:30", "%H:%M").strftime("%H:%M")
if last_message != None and has_new_day_started(last_message, now):
flag = True
if current_time > today_0230pm_UTC and current_time < today_0800pm_UTC:
if flag:
send_webhook(content)
flag = False
last_message = now
from tradingview-free-webhook-alerts.
Pipedream will stop the script after a certain time, it also means no variables can be saved.
If you really want to save something for future use you may check out Data Stores. Notice that the feature is still in beta.
from tradingview-free-webhook-alerts.
Thank you so much, that helped me a lot
from tradingview-free-webhook-alerts.
Related Issues (20)
- 'NoneType' object has no attribute 'replace' HOT 3
- #cloud based workflow server #resolved gimail integration requirement in tradingview free webhook alert #pipedream HOT 1
- #Pipedream#Python code Take snapshort of chart and send it to Discord , twitter and also to Telegram with url when Trading view Alert triger
- # webhook message send to botwebsite [https://tradingview.to/anywhere] does not respond to the message. does place a order on the exchanges binance test net HOT 2
- YouTube video guideππ
- src.helpers not available HOT 3
- it stops suddenly HOT 3
- Mistype
- CryptoHopper Webhook not working HOT 1
- thanks HOT 2
- ModuleNotFoundError: No module named 'PlanToRun'
- Missing `waitress`
- Pipedream Timeout Error HOT 1
- Telegram Alert HOT 6
- Not taking action in bot HOT 3
- Tradingview does not allow outlook emails to be added for sending alerts HOT 1
- ngrok-agent version "2.3.41" is too old HOT 1
- [feat] Bypass exchange region IP ban HOT 3
- Can i get unlimited alerts with this? HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tradingview-free-webhook-alerts.