"; return html; }, source: function(term, response){ $.getJSON(url, { q: term }, function(data){ var json = JSON.parse(data); response(json); }); }, onSelect: function(e, term, item){ if (typeof onSelectStockFn === "function") { var code = item.getAttribute('data-code'); var name = item.getAttribute('data-name'); onSelectStockFn(code, name); } }, }); } function onSelectStockFn(code){ var url = stock_overview_url.replace("12345", code); location.href = url; }
- Australia
- Canada
- Malaysia
- Singapore
United Kingdom
- United States
New Portfolio
You should check in on some of those fields below.
PORTFOLIO: maintain record of your purchases, sales and cash transactions.
WATCHLIST: track a list of stocks to "watch" or follow.
Name
Description
Tag
Confirmation
Click Confirm to delete this list.
Imperial Oil Limited
AMEX (USD): Imperial Oil Limited (IMO)
Share this:
Last Price
69.99
Today's Change
+0.74 (1.06%)
Day's Change
68.82 - 70.02
Trading Volume
216,550
- Overview
- Prices
- Latest Prices
- Price Target
- Discussions
- Market Buzz
- Historical Data
- Financials
- Summary
- Last 10 FY
- Quarter
- Annual
- Annual Report
- Profile
- Key Executives
Create Alert
You are setting up a price and signal alert with 15 minutes delay. Click here to enjoy real-time price and signal alerts.
Stock
Alert Type
Current Price
Value (USD)
Signal
Signal Duration
Signal Type
Frequency
Expiration Date
Alert Actions
Last Trigger Date:
-
Alert Name
Note
"; return html; }, source: function(term, response){ $.getJSON(url, { q: term }, function(data){ var json = JSON.parse(data); response(json); }); }, onSelect: function(e, term, item){ var code = item.getAttribute('data-code'); var name = item.getAttribute('data-name'); var alertName = name + " (" + code + ")"; alertName = code + " (" + name + ")"; $(inputElem).closest("div").find("#stock-alert-name").val(alertName); $(inputElem).closest("div").find("#stock-alert-code").val(code); retrieveCurrentPrice(code, $(inputElem).closest(".card-body")); setAlertName(); } }); $(inputElem).on("input", function() { $("#stock-alert-code").val(""); $("#stock-alert-name").val(""); $("#curr-price-message").html(""); }); $(inputElem).blur(function() { var td = $(this).closest("div"); var value = td.find("#stock-alert-code").val(); if(!value){ $(inputElem).val(""); $("#stock-alert-code").val(""); $("#stock-alert-name").val(""); $("#curr-price-message").html(""); } }); } function retrieveCurrentPrice(stockCode, elem){ if(!elem || elem.length == 0){ elem = $("#price-alert-modal"); } elem.find("#curr-price-loading").show(); elem.find("#curr-price-message").html("Retrieving Current Price."); if(stockCode){ $.ajax({ type: "POST", url: apiRoot + "/pricetarget/ret-curr-price", async: true, contentType: "application/json;charset=UTF-8", data: JSON.stringify({ "stockCode": stockCode, "showPricePercentage": true, "showColor": true }), success: function(data, textStatus, xhr) { if("E" == data){ elem.find("#curr-price-message").html("Error: Current Price not found."); }else{ elem.find("#curr-price-message").html(data); } elem.find("#curr-price-loading").hide(); }, error: function(xhr, status, error) { var msg = getHttpErrorMsg(xhr); if (msg != "") { elem.find("#curr-price-message").html("Error: " + msg); } $("#curr-price-loading").hide(); } }); } } function setAlertName(){ var selected = $("#price-alert-modal").is(":visible") ? $("#price-alert-modal") : $(".detail-div:visible"); var display_name = selected.find("#price-alert-type-select").find("option:selected").attr("data-name"); if(display_name){ var signal = selected.find("#signal-select").find("option:selected").attr("data-name"); signal = isEmptyString(signal) ? "" : signal; var duration = selected.find("#duration-select").find("option:selected").attr("data-name"); duration = isEmptyString(duration) ? "" : duration; var signal_type = selected.find("#signal-type-select").find("option:selected").attr("data-name"); signal_type = isEmptyString(signal_type) ? "" : signal_type; display_name = display_name.replace("$\{stock\}", selected.find("#stock-alert-name").val()); display_name = display_name.replace("$\{price\}", selected.find("#price-alert-value-input").val()); display_name = display_name.replace("$\{signal\}", signal); display_name = display_name.replace("$\{duration\}", duration); display_name = display_name.replace("$\{signal_type\}", signal_type); } selected.find("#price-alert-name-input").val(display_name); checkEnteredValue(); } function checkEnteredValue(elem){ var selected = $("#price-alert-modal").is(":visible") ? $("#price-alert-modal") : $(".detail-div:visible"); var selected_field = selected.find("#price-alert-value-input"); var valid = true; var entered_value = Number(selected_field.val()); var stock_price = Number(selected.find("#curr-price-label").html()); var type_field = selected.find("#price-alert-type-select"); var selected_type = selected.find("#price-alert-type-select").find("option:selected").val(); var selected_signal = selected.find("#signal-select"); var signal = selected.find("#signal-select").find("option:selected").attr("data-sysname"); var duration_field = selected.find("#duration-select"); var selected_duration = selected.find("#duration-select").find("option:selected").html(); var duration = selected.find("#duration-select").find("option:selected").attr("data-sysname"); if(elem){ selected_field = elem.find("#price-alert-value-input"); entered_value = Number(elem.find("#price-alert-value-input").val()); stock_price = Number(elem.find("#curr-price-label").html()); type_field = elem.find("#price-alert-type-select"); selected_type = elem.find("#price-alert-type-select").find("option:selected").val(); selected_signal = elem.find("#signal-select"); signal = elem.find("#signal-select").find("option:selected").attr("data-sysname"); duration_field = elem.find("#duration-select"); selected_duration = elem.find("#duration-select").find("option:selected").html(); duration = elem.find("#duration-select").find("option:selected").attr("data-sysname"); } if(cd_above_id == selected_type){ if(entered_value < stock_price){ valid = false; showErrorOnField(selected_field, "Value must greater than " + stock_price); } if(activePriceCount == 0) { valid = false; var reachedLimitMsg = "Oops, your account is not eligible for Price Alert."; showErrorOnField(type_field, reachedLimitMsg); } if(usedPriceCount >= activePriceCount) { valid = false; var reachedLimitMsg = "Oops, your account have reached the limit of active Price Alert."; showErrorOnField(type_field, reachedLimitMsg); } } else if(cd_below_id == selected_type){ if(entered_value > stock_price){ valid = false; showErrorOnField(selected_field, "Value must lower than " + stock_price); } if(activePriceCount == 0) { valid = false; var reachedLimitMsg = "Oops, your account is not eligible for Price Alert."; showErrorOnField(type_field, reachedLimitMsg); } else if(usedPriceCount >= activePriceCount) { valid = false; var reachedLimitMsg = "Oops, your account have reached the limit of active Price Alert."; showErrorOnField(type_field, reachedLimitMsg); } } else if(cd_signal_id == selected_type){ var notEligibleForStrategyMsg = "Oops, your account is not eligible for this strategy."; if(signal == "OBV") { showErrorOnField(selected_signal, notEligibleForStrategyMsg); valid = false; } if(signal == "VOLUME BREAKOUT") { showErrorOnField(selected_signal, notEligibleForStrategyMsg); valid = false; } if(signal == "TURTLE SYSTEM 20" || signal == "TURTLE SYSTEM 55") { showErrorOnField(selected_signal, notEligibleForStrategyMsg); valid = false; } if(activeMqSignalCount == 0) { valid = false; var reachedLimitMsg = "Oops, your account is not eligible for MQ Signal Alert."; showErrorOnField(type_field, reachedLimitMsg); if (typeof showSignalModal === "function") { showSignalModal(); } } else if(usedMqSignalCount >= activeMqSignalCount) { valid = false; var reachedLimitMsg = "Oops, your account have reached the limit of active MQ Signal Alert."; showErrorOnField(type_field, reachedLimitMsg); if (typeof showSignalModal === "function") { showSignalModal(); } } var validDuration = true; if(chartDuration == "Weekly" && duration != "Weekly") { validDuration = false; } else if(chartDuration == "Daily" && (duration == "Hourly" || duration == "30 Mins" || duration == "10 Mins" || duration == "5 Mins")) { validDuration = false; } else if(chartDuration == "Hourly" && (duration == "30 Mins" || duration == "10 Mins" || duration == "5 Mins")) { validDuration = false; } else if(chartDuration == "30 Mins" && (duration == "10 Mins" || duration == "5 Mins")) { validDuration = false; } else if(chartDuration == "10 Mins" && (duration == "5 Mins")) { validDuration = false; } if(!validDuration) { valid = false; var reachedLimitMsg = "Oops, your account only can use Signal Duration up to " + chartDuration + "."; showErrorOnField(duration_field, reachedLimitMsg); } } valid &= validateDatePeriod("price-alert-expiration-date-input", signalValidityMonth); return valid; } function validateDatePeriod(date_to_id, month_interval){ //set today date for Date To var date_to = $("#" + date_to_id).val(); if(isEmptyString(date_to)) return true; var date_to_obj = checkField($("#" + date_to_id).get(), true); var valid = date_to_obj.isValid(); if(!valid) return false; //date period field are mandatory var from_date_moment = moment("2024-05-19","YYYY-MM-DD"); var to_date_moment = moment(date_to,"YYYY-MM-DD"); //from date cannot greater than to date if(from_date_moment > to_date_moment){ showTbModalMesg(tbmesgtypeError, "Invalid Date Period.", null, true); return false; } if(month_interval == null) return true; //set today date for Date From month_interval = !isNaN(month_interval) ? Number(month_interval) : 0; //difference month var diff_month = to_date_moment.diff(from_date_moment, 'months', true); if(diff_month > month_interval){ var datePeriodWithinMsg = "Date Period must be within " + month_interval + " months."; showErrorOnField($("#" + date_to_id), datePeriodWithinMsg); return false; } return true; } function toggleAlertTypeField(elem) { var selected_div = $(elem).closest(".card-body"); if(!selected_div || selected_div.length == 0){ selected_div = $("#price-alert-modal"); } var alert_type = checkField(selected_div.find("#price-alert-type-select").get()); var alert_type_signal = false; if(cd_signal_id == alert_type.getValue()) { alert_type_signal = true; } if(alert_type_signal) { $(".type-signal").show(); $(".type-price").hide(); selected_div.find("#price-alert-value-input").val(""); } else { $(".type-signal").hide(); $(".type-price").show(); selected_div.find("#signal-select").val(""); selected_div.find("#duration-select").val(""); selected_div.find("#signal-type-select").val(""); } } function savePriceAlert(elem){ toggleSaveButton(elem, true); var selected_div = $(elem).closest(".card-body"); if(!selected_div || selected_div.length == 0){ selected_div = $("#price-alert-modal"); } var record_id = selected_div.find("#price-alert-record-id").val(); var stock_name = checkField(selected_div.find(".stock-input").get(), true); var alert_type = checkField(selected_div.find("#price-alert-type-select").get(), true); var alert_type_signal = false; if(cd_signal_id == alert_type.getValue()) { alert_type_signal = true; } var value = checkField(selected_div.find("#price-alert-value-input").get(), !alert_type_signal); var formatted_value = Math.round(Number(value.getValue()) * 10000); var signal = checkField(selected_div.find("#signal-select").get(), alert_type_signal); var duration = checkField(selected_div.find("#duration-select").get(), alert_type_signal); var signal_type = checkField(selected_div.find("#signal-type-select").get(), alert_type_signal); var ori_frequency = selected_div.find('#frequency-checkbox').attr("data-orig"); var frequency = checkField(selected_div.find("#price-alert-frequency-select").get(), true); var expired_date = checkField(selected_div.find("#price-alert-expiration-date-input").get(), true); var ori_alert_action = selected_div.find('#alert-action-label').attr("data-orig"); var alert_action = ""; selected_div.find(".alert-actions:checked").each(function(){ alert_action += $(this).val() + ","; }); if(alert_action){ alert_action = alert_action.slice(0, -1); } var alert_name = checkField(selected_div.find("#price-alert-name-input").get(), true); var note = checkField(selected_div.find("#price-alert-note-input").get()); var valid = stock_name.isValid() && alert_type.isValid() && value.isValid() && expired_date.isValid() && alert_name.isValid() && frequency.isValid() && signal.isValid() && duration.isValid() && signal_type.isValid(); valid &= checkEnteredValue(selected_div); var change = getAllValue(selected_div) != price_alert_orig_value; if (valid && change){ $.ajax({ type: "POST", url: apiRoot + "/pricealert/save", async: true, contentType: "application/json;charset=UTF-8", data: JSON.stringify({ id: record_id, stockCode: selected_div.find("#stock-alert-code").val(), value: formatted_value, signalId: signal.getValue(), durationId: duration.getValue(), signalTypeId: signal_type.getValue(), expiredDate: expired_date.getValue(), alertName: alert_name.getValue(), note: note.getValue(), alertTypeId: alert_type.getValue(), alertActionIds: alert_action, frequencyId: frequency.getValue(), userid: "", }), success: function(data, textStatus, xhr) { if(record_id != "0"){ showPgTopToast("Alert updated successfully."); }else{ showPgTopToast("Alert added successfully."); } setTimeout(function() { toggleSaveButton(elem, false); if(record_id != "0"){ if (typeof callbackAfterUpdate === "function") { callbackAfterUpdate(data, elem); } }else{ if (typeof callbackAfterCreation === "function") { callbackAfterCreation(); } } }, 1000); }, error: function(xhr, status, error) { var msg = getHttpErrorMsg(xhr); if (msg != "") { toggleSaveButton(elem, false); showPgTopToast("Failed to create Alert.
" + msg); } } }); }else{ toggleSaveButton(elem, false); } if(valid && !change){ showPgTopToast("No change."); } } function deletePriceAlertFromModal(){ showStockConfirmModal("Click Confirm to delete this alert."); $("#stock-confirm-btn").unbind('click'); $("#stock-confirm-btn").click(function() { deletePriceAlert($("#price-alert-record-id").val()); }); } function deletePriceAlert(id){ $.ajax({ type: "POST", url: apiRoot + "/pricealert/delete/" + id, async: true, success: function(data, textStatus, xhr) { showPgTopToast("Alert deleted successfully."); setTimeout(function() { if($("#dttable-price-alert").is(":visible")){ dttable.row(curr_selected_tr).remove().draw(); $("#price-alert-log-table tbody").html(""); } hideStockConfirmModal(); hidePriceAlertModal(); }, 1000); }, error: function(xhr, status, error) { var msg = getHttpErrorMsg(xhr); if (msg != "") { toggleSaveButton(elem, false); showPgTopToast("Failed to delete Alert.
" + msg); } } }); } function toggleSaveButton(selected, show_saving){ if(!selected) return; if(show_saving){ $(selected).attr("disabled", true); $(selected).find(".fa-save").hide(); $(selected).find(".fa-spinner").show(); }else{ $(selected).attr("disabled", false); $(selected).find(".fa-save").show(); $(selected).find(".fa-spinner").hide(); } } function addPriceAlertCount (){ usedPriceCount++; } function addMqSignalAlertCount (){ usedMqSignalCount++; } function minusPriceAlertCount (){ usedPriceCount--; } function minusMqSignalAlertCount (){ usedMqSignalCount--; }
Discussions
Be the first to like this. Showing 0 of 0 comments
Post a Comment
People who like this
Latest Videos
MQ Market Updates - 17 May 2024
MQ Trader
Share this:
Apps
MQ Chat
Send individual or group chats with anyone on i3investor
MQ Trader
Earn MQ Points while trading with MQ Trader
Earn side income from Affiliate Program
MQdemy
Online learning and teaching marketplace
Top Articles
1
CEO Morning Brief
US Federal Court Enforces SEC's Subpoena to Depose Elon Musk
2
CEO Morning Brief
JPMorgan’s Dimon Calls for ‘full Engagement’ With China
3
CEO Morning Brief
Tesla Must Face Claims It Misled Buyers About Autopilot and Self-driving, US District Judge Rules
4
CEO Morning Brief
US Core CPI Cools for First Time in Six Months in Relief for Fed
5
CEO Morning Brief
Dow Breaches 40,000 Mark as Rate-cut Hopes Fuel Fresh Record High
Hot Stocks Today >
#
Stock
Score
1
AAPL
Apple Inc.
1000
2
BABA
Alibaba Group Holding Limited
342
3
BCO
The Brink's Company
285
4
ETN
Eaton Corporation plc
285
6
GOOGL
Alphabet Inc.
214
7
GME
GameStop Corp.
214
8
SOXL
Direxion Daily Semiconductor Bull 3X Shares
214
9
BIDU
Baidu, Inc.
214
10
PLTR
Palantir Technologies Inc.
200
Daily Stocks
- Active
- Gainers
- Losers
Stock
Last
Change
Volume
CRKN
0.171
-0.069
1,633,951,956
FFIE
1.01
-0.631
1,235,259,435
GWAV
0.154
+0.006
1,126,085,045
AKAN
0.173
+0.04
538,688,745
CYXT
0.065
0.00
369,807,727
BURU
0.214
+0.073
251,078,223
UWT
0.164
-0.002
244,137,454
PEGY
0.105
-0.043
214,373,758
AGIL
0.197
+0.114
206,404,986
LYLT
0.218
0.00
204,480,452
More active Stocks
Stock
Last
Change
Volume
BRK-A
629,375.00
+4,275.00
14,377
MSTR
1,584.50
+144.52
1,619,648
RTLA
209.90
+74.87
CMG
3,213.43
+67.55
258,521
ACSG
33.28
+33.28
99,050
EMSA
140.77
+30.77
EMLB
80.80
+30.30
NRGU
572.75
+29.49
17,735
WTM
1,764.57
+28.25
6,713
SEB
3,371.21
+27.52
1,861
More gainer Stocks
Stock
Last
Change
Volume
MSTR
1,065.03
-227.94
2,455,399
MELI
1,629.32
-188.66
1,851,535
BH-A
973.35
-103.85
666
MKL
1,395.13
-102.30
318,280
LOWC
30.18
-92.412
1,236,074
NVDA
762.00
-84.71
85,558,284
BIO-B
279.91
-58.64
470
AVGOP
1,406.70
-37.32
36,980
MPWR
732.21
-35.39
515,847
BBLGW
35.02
-34.52
2,035
More loser Stocks
Top Brokers >
Books Review >
Ride The Bull Short The Bear
CS Tan
4.9 / 5.0
This book is the result of the author's many years of experience and observation throughout his 26 years in the stockbroking industry. It was written for general public to learn to invest based on facts and not on fantasies or hearsay....
Read More