Help with adding an alert to an indicator - futures io
futures io



Help with adding an alert to an indicator


Discussion in EasyLanguage Programming

Updated
    1. trending_up 2,832 views
    2. thumb_up 2 thanks given
    3. group 2 followers
    1. forum 2 posts
    2. attach_file 0 attachments




Welcome to futures io: the largest futures trading community on the planet, with well over 150,000 members
  • Genuine reviews from real traders, not fake reviews from stealth vendors
  • Quality education from leading professional traders
  • We are a friendly, helpful, and positive community
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts
  • We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

(If you already have an account, login at the top of the page)

 
Search this Thread
 

Help with adding an alert to an indicator

(login for full post details)
  #1 (permalink)
george10294
Los Angeles, CA
 
 
Posts: 2 since Jul 2021
Thanks: 1 given, 1 received

Hello. Iím having a problem figuring out how to add an alert to a simple indicator. Iíve looked around the web and read through easylanguage manuals and canít find the exact solution so I thought Iíd ask here.

Here is the code for the indicator. It is simple and just measures the change in price for a stock for X number of minutes. The example below is coded for 2 minutes (setting Timeframe to minutes)

Vars: cng(0);

cng = ((close / close[2] ) -1 ) ;
If Close[1] > 0 then
cng = ((Close / Close[2] ) -1 ) ;

Plot1(cng);

If Plot1 > 0 then
SetPlotColor(1, GREEN)
Else
SetPlotColor(1, RED);


I am just trying to add an alert to this so that it will alert me when the price change over X minutes is > 10%, or 12%... etc.

Can anyone assist? Thank you.

Reply With Quote

Can you help answer these questions
from other members on futures io?
Multi Time Frame High/Low/Median levels
NinjaTrader
help with take profit several targets
TradeStation
Big Mo Indicator for NT8
NinjaTrader
in depth understanding of last, bid, and ask volume in c …
NinjaTrader
How do I create Strategy with the Second Entry indicator
NinjaTrader
 
 
(login for full post details)
  #2 (permalink)
 ABCTG   is a Vendor
 
 
Posts: 2,361 since Apr 2013
Thanks: 426 given, 1,578 received

Hi george10294,

welcome to futures.io. Take a look at the built-in RSI indicator. This demonstrates how you can trigger an alert on a cross over/under a threshold.

Regards,

ABCTG


george10294 View Post
Hello. Iím having a problem figuring out how to add an alert to a simple indicator. Iíve looked around the web and read through easylanguage manuals and canít find the exact solution so I thought Iíd ask here.

Here is the code for the indicator. It is simple and just measures the change in price for a stock for X number of minutes. The example below is coded for 2 minutes (setting Timeframe to minutes)

Vars: cng(0);

cng = ((close / close[2] ) -1 ) ;
If Close[1] > 0 then
cng = ((Close / Close[2] ) -1 ) ;

Plot1(cng);

If Plot1 > 0 then
SetPlotColor(1, GREEN)
Else
SetPlotColor(1, RED);


I am just trying to add an alert to this so that it will alert me when the price change over X minutes is > 10%, or 12%... etc.

Can anyone assist? Thank you.


Follow me on Twitter Reply With Quote
The following user says Thank You to ABCTG for this post:
 
(login for full post details)
  #3 (permalink)
george10294
Los Angeles, CA
 
 
Posts: 2 since Jul 2021
Thanks: 1 given, 1 received


Thank you ABCTG.

This is what I came up with.


Vars: cng(0);

cng = ((close / close[5] ) -1 ) ;
If Close[1] > 0 then
cng = ((Close / Close[5] ) -1 ) ;

Plot1(cng);

If Plot1 > 0 then
SetPlotColor(1, GREEN)
Else
SetPlotColor(1, RED);

Inputs:

HiAlert( 0 ) [DisplayName = "HiAlert",
ToolTip = "Enter percentage amount above which an alert will be triggered. Example: 10."];

{ alert criteria }
if AlertEnabled then
begin
if cng crosses over HiAlert then
Alert( !( "Bullish alert" ) );
end;




Not sure if this is clean, but it seems to work as I intended. Thanks again.

Reply With Quote
The following user says Thank You to george10294 for this post:


futures io Trading Community Platforms and Indicators EasyLanguage Programming > Help with adding an alert to an indicator


Last Updated on July 30, 2021


Upcoming Webinars and Events
 

NinjaTrader Indicator Challenge!

Ongoing
     



Copyright © 2023 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada), info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts