Welcome to the Traders Laboratory Forums.
Coding Forum Collaborate, receive help, or discuss coding related issues.

Reply
Old 06-29-2009, 01:53 PM   #1

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Add the Timeframe to the Alert Box in TS?

Would their be anyway to add the timeframe to the alert notification box? I have a bunch of open charts all with the same indicators in them (watching like the same currency pair, but on 4 different timeframes) and when I get an alert of a potential signal, I still have to search all 4 timeframes to tell where it fired off in because the alert box only tells me what symbol it is in.

So is it possible to add any kind of code to the

Alert( "Signal ");

statement?

I was thinking maybe the use of BarInterval? I tried adding it as a string with the

+ numtoStr(BarInterval,2) stuff to no avail.

Any ideas gents?
daedalus is offline  
Reply With Quote
Old 06-29-2009, 01:57 PM   #2

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Add the Timeframe to the Alert Box in TS?

you should look up the EasyLanguage dictionary...

all the parameters are there.

;-)
Tams is offline  
Reply With Quote
Old 06-29-2009, 02:09 PM   #3

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Re: Add the Timeframe to the Alert Box in TS?

I'm reading it!

I keep trying stuff like:

Code:
Alert("Alert" + BarInterval);
Based off their example of

Code:
Alert("A New High has been hit for ” + GetSymbolName);
But keep getting this Data Type Mismatch error....
daedalus is offline  
Reply With Quote
Old 06-29-2009, 02:17 PM   #4

Trader333's Avatar

Join Date: May 2008
Location: UK
Posts: 153
Ignore this user

Thanks: 79
Thanked 24 Times in 20 Posts

Re: Add the Timeframe to the Alert Box in TS?

What you could do (which is a bit laborious but would work) is to rename the indicator being used for each of the timeframes you have it in. So if, for example, you used macd in four timeframes and they were 30 min, 60 min, 4 hour and daily then rename the indicator something like: 30_macd, 60_macd, 4hr_macd and dly_macd then insert the relevant one into the chart with the timeframe being used.



Paul
Trader333 is offline  
Reply With Quote
The Following User Says Thank You to Trader333 For This Useful Post:
daedalus (06-29-2009)
Old 06-29-2009, 02:20 PM   #5

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Add the Timeframe to the Alert Box in TS?

Alert

Triggers an alert window where the necessary text can be created.
The text can be dynamic, static or absent.


Usage

Alert


Notes

If the text isn't set in the alert then Source, Symbol, Resolution, Price is displayed

Alerts are shown on the last bar only

Detailed information of alerts' settings is available in Formatting Studies > Alerts


Example

This statement will call an alert without text message:

Alert;


This statement creates a dynamic alert text and displays the number of the weekday:

Alert( Text("Day-of-week-is:", DayOfWeek(Date)) );


This statement will show static text:

If Close > Close[1] Then
Alert( "Price turning up" )




Source: EasyLanguage / PowerLanguage manual

Last edited by Tams; 06-29-2009 at 02:46 PM.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
daedalus (06-29-2009)
Old 06-29-2009, 02:24 PM   #6

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Add the Timeframe to the Alert Box in TS?

basically the format is like this:


ALERT( StringVariable );



you can replace StringVariable with anything you like.

e.g.

var:
StringVariable("");

stringvariable = numtoStr(BarInterval,0);


If Close > Close[1] Then
Alert( stringvariable );
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
daedalus (06-29-2009)
Old 06-29-2009, 02:32 PM   #7

Tams's Avatar

Join Date: Sep 2008
Location: Geelong
Posts: 3,779
Ignore this user

Thanks: 2,084
Thanked 1,474 Times in 912 Posts

Re: Add the Timeframe to the Alert Box in TS?

you can string up the custom identifiers...



input:
Chart.ID(1);

var:
StringVariable("");

stringvariable = "Chart=" + numtostr(chart.id,0) + ":" + GetSymbolName + ":" + numtoStr(BarInterval,0);


If Close > Close[1] Then
Alert( stringvariable );
Tams is offline  
Reply With Quote
Old 06-29-2009, 02:46 PM   #8

daedalus's Avatar

Join Date: Jul 2007
Location: Omaha, NE
Posts: 627
Ignore this user

Thanks: 431
Thanked 551 Times in 228 Posts

Re: Add the Timeframe to the Alert Box in TS?

I got it to work... using

Code:
Alert(Text(BarInterval, " Alert") );
Thanks as usual!
daedalus is offline  
Reply With Quote

Reply

Thread Tools
Display Modes Help Others By Rating This Thread
Help Others By Rating This Thread:


Similar Threads
Thread Thread Starter Forum Replies Last Post
Easy Language - Order Last for 24 Hours on 1-min Timeframe Radek Automated Trading 2 06-29-2009 09:28 AM
Help W/ Avg Vol By TimeFrame ELD CuriousGeorge Coding Forum 1 04-05-2009 12:03 AM
How to Access Higher Timeframe Data thewoj Coding Forum 3 02-29-2008 12:36 AM
How vital is the timeframe that you pick for your charts? brownsfan019 Technical Analysis 29 11-22-2007 06:49 PM
Stay Alert! 11/15/07 Soultrader Market Analysis 0 11-15-2007 05:03 AM

All times are GMT -4. The time now is 01:24 PM.
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
CS to VB integration by DeskLancer
©2006-2011 Traders Laboratory, All Rights Reserved.