Topics
Replies
onyiaegwu.nduka
06 Sep 2018, 11:26
( Updated at: 21 Dec 2023, 09:20 )
RE:
Thanks for your reply but part of the candlestick is touching the outer Bollinger band. I want an alart(email) that will indicate when the whole candlestick is outside and not touching the outer Bollinger band.
Danis said:
Starfield.MarketStatus indicator created by starfield and selling from ClickAlgo contain this visual indication of candlestick that is outside of BollingerBand
@onyiaegwu.nduka
onyiaegwu.nduka
22 Jan 2018, 20:08
RE:
Paul_Hayes said:
Hi onyiaegwu.nduka,
You can also use this tool and choose from 7 different types of moving average which will send alerts when:
Alert Conditions
- Moving Average rises above the symbol price.
- Moving Average falls below the symbol price.
- Symbol price rises above the moving average.
- Symbol price falls below the moving average
- Moving Average rises above a pre-defined symbol price.
- Moving Average falls below a pre-defined symbol price.
Types of Alert
- Popup Window
- SMS
- Telegram Message
Paul Hayes
Sales & Marketing
Email: contact@clickalgo.com
Phone: (44) 203 289 6573
Website: https://clickalgo.com
Can i use this indicator in manual trading (C trader's platform)
@onyiaegwu.nduka
onyiaegwu.nduka
22 Jan 2018, 20:06
RE:
Panagiotis Charalampous said:
Hi onyiaegwu.nduka,
You can use the Notifications class to send email alerts.
Let me know if this information helps.
Best Regards,
Panagiotis
How can I use Notification to achieve my aim.
@onyiaegwu.nduka
onyiaegwu.nduka
31 Jul 2020, 14:35
RE:
PanagiotisCharalampous said:
Below is the code:
using
System;
using
cAlgo.API;
using
cAlgo.API.Internals;
using
cAlgo.API.Indicators;
using
cAlgo.Indicators;
using
System.Collections.Generic;
using
System.Net;
namespace
cAlgo
{
[Indicator(IsOverlay =
true
, TimeZone = TimeZones.UTC, AccessRights = AccessRights.Internet)]
public
class
AlertForIndicator : Indicator
{
[Parameter(
"Fast Line"
, Group =
"Source"
)]
public
DataSeries Fast {
get
;
set
; }
[Parameter(
"Slow Line"
, Group =
"Source"
)]
public
DataSeries Slow {
get
;
set
; }
[Parameter(
"Long Signal"
, Group =
"Signal"
, DefaultValue =
false
)]
public
bool
Long {
get
;
set
; }
[Parameter(
"Short Signal"
, Group =
"Signal"
, DefaultValue =
false
)]
public
bool
Short {
get
;
set
; }
[Parameter(
"Arrow on Chart"
, Group =
"Signal"
, DefaultValue =
true
)]
public
bool
Arrow {
get
;
set
; }
[Parameter(
"Backtest"
, Group =
"Signal"
, DefaultValue =
false
)]
public
bool
Bckt {
get
;
set
; }
[Parameter(
"Email"
, Group =
"Notification"
, DefaultValue =
false
)]
public
bool
SendEmail {
get
;
set
; }
[Parameter(
"Telegram"
, Group =
"Notification"
)]
public
bool
SendTelegram {
get
;
set
; }
[Parameter(
"Sound ON"
, Group =
"Notification"
, DefaultValue =
true
)]
public
bool
PlaySound {
get
;
set
; }
[Parameter(
"Media File Location"
, Group =
"Notification"
, DefaultValue =
"c:\\windows\\media\\Alarm01.Wav"
)]
public
string
MediaFile {
get
;
set
; }
[Parameter(
"From"
, Group =
"Email"
, DefaultValue =
"from@example.com"
)]
public
string
Sender {
get
;
set
; }
[Parameter(
"To"
, Group =
"Email"
, DefaultValue =
"to@example.com"
)]
public
string
Receiver {
get
;
set
; }
[Parameter(
"Subject"
, Group =
"Email"
, DefaultValue =
"my subject"
)]
public
string
Subject {
get
;
set
; }
[Parameter(
"Message"
, Group =
"Email"
, DefaultValue =
""
)]
public
string
EmailBody {
get
;
set
; }
[Parameter(
"ChatId"
, Group =
"Telegram"
, DefaultValue =
""
)]
public
string
ChatId {
get
;
set
; }
[Parameter(
"Token"
, Group =
"Telegram"
, DefaultValue =
""
)]
public
string
BotToken {
get
;
set
; }
[Parameter(
"Cross Up Color"
, Group =
"Colors"
, DefaultValue =
"Lime"
)]
public
string
ColorArrowUP {
get
;
set
; }
[Parameter(
"Cross Down Color"
, Group =
"Colors"
, DefaultValue =
"Orange"
)]
public
string
ColorArrowDW {
get
;
set
; }
string
TelgramURL;
protected
override
void
Initialize()
{
System.Net.ServicePointManager.SecurityProtocol = System.Net.SecurityProtocolType.Tls12;
TelgramURL =
string
.Format(
"https://api.telegram.org/bot{0}/sendMessage?chat_id={1}&text="
, BotToken, ChatId);
}
int
LastBar = 0;
public
override
void
Calculate(
int
index)
{
if
(index <= LastBar)
return
;
LastBar = index;
string
message = Symbol.Name +
"\n"
+ Symbol.Bid +
"\n"
+ TimeFrame;
if
(Long && Fast.HasCrossedAbove(Slow, 0))
{
if
(PlaySound)
Notifications.PlaySound(MediaFile);
if
(SendEmail)
Notifications.SendEmail(Sender, Receiver, Subject, EmailBody +
" "
+ message +
" "
+
"Cross Long Signal"
);
if
(Arrow)
Chart.DrawIcon(Bckt ?
"Up"
+ index :
"Up"
, ChartIconType.UpArrow, index, Bars[LastBar - 5].Low, Color.FromName(ColorArrowUP));
if
(SendTelegram)
SendMessage(message +
"\n"
+
"Cross Long Signal"
+
"\n"
+ EmailBody);
}
else
if
(Short && Fast.HasCrossedBelow(Slow, 0))
{
if
(PlaySound)
Notifications.PlaySound(MediaFile);
if
(SendEmail)
Notifications.SendEmail(Sender, Receiver, Subject, EmailBody +
" "
+ message +
" "
+
"Cross Short Signal"
);
if
(Arrow)
Chart.DrawIcon(Bckt ?
"Down"
+ index :
"Down"
, ChartIconType.DownArrow, index, Bars[LastBar - 5].High, Color.FromName(ColorArrowDW));
if
(SendTelegram)
SendMessage(message +
"\n"
+
"Cross Short Signal"
+
"\n"
+ EmailBody);
}
}
void
SendMessage(
string
s)
{
var request = WebRequest.Create(TelgramURL + s);
request.ContentType =
"application/x-www-form-urlencoded"
;
request.Method =
"POST"
;
var response = request.GetResponse();
}
}
}
@onyiaegwu.nduka