I have a fundamental question of how to ensure my alerts are coming thru email - should i be using scan or explore after i code the alerts program as below: (I wanted this Alerts program to scan the symbols in my watch list and also assuming i can use "QSI#" for the name of the silver futures current rolled contract??)
Blockquote// Alerts for the price values
""
//Consolidated Break Stops
Buy = Cross(C, 14.7) AND Name()=="QSI#";
AlertIf( Buy, "EMAIL", "Consolidation Break for QSI trade- move the stop", 4 );
Buy = Cross(C, 1225) AND Name()=="QGC#";
AlertIf( Buy, "EMAIL", "Consolidation Break for QGC trade- move the stop", 4 );
""
Not sure if this is right question for the right category....i think this is a fundamental question:
"Once i write the program and save it (code above) - how do i actually execute it so i can get my alerts on my phone/email when the price levels are reached for a certain symbol as explained/instructed in the code?"
I read the manual and tried the instructions to scan/produce alerts when certain symbols get to the price- i want to confirm if i am doing it right; Attached is the screenshot
Few questions:
Are my scan settings right? (filter for a watchlist of symbols, "All Quotes", ignoring date range)
How will it track prices in future to issue alerts at right time? (because Scan process seem to have completed)
Why is it looking historical prices (as per scan output here) when the default look back is 1 - not just the last value ?
Which time frame close price is scanned here? (daily, hourly etc?) Can I specify a specific time frame - if so, where should i try that?
I am assuming symbol nomenclature such as QSI# is fine as that's what is used for charts display for future contract - currently active month? (I use IQFEED data)
Go to the Settings Window of AA, toolbox icon or use shortcut Alt + Enter.
You are still overlooking the basics and that means you have to go through the manual once again.
One can validate if you present all your settings against the requirement. No guess work.
Again go through manual and Auto-Repeat function.
Read manual, periodicity setting.
You have instructed the scan on "ALL Quotes", this means all data.
If you want to test the most recent day, use 1 recent bar(s) instead.
It is consistent with name its stored as in the DB.
Looking at the screenshot, and specifically your AFL, it will work but technically the whole purpose of Scan/Exploration is to the run the same AFL on all symbols filtered.
You don't need to code a specific condition for each symbol unless you have specific bits for each one.
Instead, go to the Filter Section, add symbols by Markets / Watchlists etc, you can even include or exclude them,
the AA is a very versatile part of AB and you can unleash its true potential if set up correctly.
You have to edit that textbox and hit enter.
You can even set it to 1 second. type "1s", make sure you hit enter.
so every minute is 1min and so on.
Default is 5min
Do the alerts come when my Amibroker is running and my PC is in sleep mode?
Also, is it possible to have alerts sent to 2 email ids? Right now, i am getting this sent to tmobile email msg and my phone receives it as text message and sometimes this tmobile is down and this doesnt work - so would like to have an alternative
Sleep is a state when processor IS NOT accessible to the end-user application (unless application forces system NOT to enter sleep - but that is big no-no for battery life). The application in Sleep state is NOT running, it is completely FROZEN, therefore application can NOT do anything.
Computer must be powered ON and NOT sleeping for application to do anything.
Until I read TJ's post, I really thought you were joking
AlertIF is a bit complex in the underlying code. https://www.amibroker.com/guide/h_alerts.html
It stores the TYPE and prevents repetitive signals so calling same AlertIF multiple times wont work.
If you want to send an email, you could just use SendEmail() but the problem is you would have to rewrite all the Logic to prevent repetitive signals and that will be tough.
I haven't tested it but if you can get around using a different TYPE, you maybe able to define two AlertIf, each with two email IDs but I don't know the consequence of the code going wrong.
Bcos with two AlertIf functions, they can easily go into an infinite loop each resetting the other like a Flip-Flop.