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

Reply
Old 08-21-2009, 06:13 AM   #1

Join Date: Jun 2009
Location: hemel
Posts: 87
Ignore this user

Thanks: 0
Thanked 2 Times in 2 Posts

Alerts in Tradestation

Hi

Is it possible to set an alert to fire continuously but only on the first bar?

So i have a list of variables like this

if ADXValue > ADXValue[1] Then Alert ("ready");

this will fire continuoulsy but i only want this to happen on the first bar if they miss that i dont want an alert!!

Thanks
chrisleonard is offline  
Reply With Quote
Old 08-21-2009, 06:48 AM   #2

Blu-Ray's Avatar

Join Date: Nov 2006
Location: England
Posts: 508
Ignore this user

Thanks: 164
Thanked 292 Times in 105 Posts

Re: Alerts in Tradestation

Quote:
Originally Posted by chrisleonard »
Hi

Is it possible to set an alert to fire continuously but only on the first bar?

So i have a list of variables like this

if ADXValue > ADXValue[1] Then Alert ("ready");

this will fire continuoulsy but i only want this to happen on the first bar if they miss that i dont want an alert!!

Thanks
Yes it's possible....... but you need to explain it better......first bar of what ?. post a screenshot with details always helps.

Cheers

Blu-Ray
__________________

“ Search is the ultimate expression of the power of the individual, using a computer, looking at the world, and finding exactly what they want ” – Eric Schmidt, Google
Blu-Ray is offline  
Reply With Quote
Old 08-21-2009, 07:42 AM   #3

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: Alerts in Tradestation

if you write out your logic one thought at a time,
if you write out your thoughts one action at a time,
if you write out your action ONE LINE at a time,

in no time you will have your codes worked out.
Tams is offline  
Reply With Quote
The Following User Says Thank You to Tams For This Useful Post:
Charlton (08-24-2009)
Old 08-21-2009, 07:43 AM   #4

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: Alerts in Tradestation

a flow chart can help you define/refine your logic



Last edited by Tams; 08-21-2009 at 07:59 AM.
Tams is offline  
Reply With Quote
Old 08-21-2009, 08:26 AM   #5

Join Date: Jun 2009
Location: hemel
Posts: 87
Ignore this user

Thanks: 0
Thanked 2 Times in 2 Posts

Re: Alerts in Tradestation

ok so in the picture you have the bar the short signal is alerted on.



Really i only want an alert if the candle closes below here and do not want an alert if i missed the first candle.

So if i was to brin up this chart and the line was white for 2 candles already i dont want an alert!

Code:
Inputs: price(Close),  length(9),
		zeroLine(21), zeroVisible(false),
	    upColour(Blue), downColour(White), colourDeltaBar(1);

Value1 = hull(price, length);


Plot1(Value1,"hull");

If ZeroVisible = true then
	Plot3(zeroLine, "Zero");

if (Value1 > Value1[1]) then Alert("Long");
if (Value1 < Value1[1]) then Alert("Short");

{ Color criteria }
if (Value1 > Value1[1]) then 
	SetPlotColor[colourDeltaBar](1, upColour)
else if (Value1 < Value1[1]) then 
	SetPlotColor[colourDeltaBar](1, downColour);

end;
Thanks
chrisleonard is offline  
Reply With Quote
Old 08-21-2009, 10:49 AM   #6

suriNotes's Avatar

Status: Educational Partner
Join Date: Nov 2007
Location: Seattle, WA
Posts: 165
Ignore this user

Thanks: 8
Thanked 156 Times in 59 Posts

Re: Alerts in Tradestation

Hi,

Try this code.. I have not tested the code, but you get the idea.

Regards,
Suri

========================= ====
Code:
Inputs: price(Close), length(9), 
	zeroLine(21), zeroVisible(false), 
	upColour(Blue), downColour(White), 
	colourDeltaBar(1); 

Var: TradeSetup(0), barColor(0);

Value1 = hull(price, length); 

Plot1(Value1,"hull"); 

If ZeroVisible = true then 
	Plot3(zeroLine, "Zero"); 

if (Value1 > Value1[1]) then 
begin	
	TradeSetup = 1;  // Long
	barColor = UpColour;
end
else if (Value1 < Value1[1]) then 
begin	
	TradeSetup =  -1; // Short
	barColor = downColour;
end;

SetPlotColor[colourDeltaBar](1, barColor);

// check if BarColor has changed
if (barColor <> barColor[1]) then
begin	
	if TradeSetup = 1 then
		Alert("Long")
	else if TradeSetup = -1 then
		Alert("Short");
end;		

{
if (Value1 > Value1[1]) then Alert("Long"); 
if (Value1 < Value1[1]) then Alert("Short"); { Color criteria } 

if (Value1 > Value1[1]) then 
	SetPlotColor[colourDeltaBar](1, upColour) 
else if (Value1 < Value1[1]) then 
	SetPlotColor[colourDeltaBar](1, downColour); 
}
suriNotes is offline  
Reply With Quote
Old 08-21-2009, 11:07 AM   #7

Join Date: Jul 2009
Location: london
Posts: 25
Ignore this user

Thanks: 0
Thanked 0 Times in 0 Posts

Re: Alerts in Tradestation

Thanks pretty damn amazing, thank you so much..
kamakazy is offline  
Reply With Quote
Old 08-23-2009, 07:26 AM   #8

Join Date: May 2008
Location: amsterdam
Posts: 114
Ignore this user

Thanks: 25
Thanked 39 Times in 30 Posts

Re: Alerts in Tradestation

Quote:
Originally Posted by chrisleonard »
Really i only want an alert if the candle closes below here and do not want an alert if i missed the first candle.

So if i was to brin up this chart and the line was white for 2 candles already i dont want an alert!
to give an alert only 1 time you simply need to change ">" by crossesover
and "<" by crossesunder
flyingdutchmen 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
Tradestation alerts ryounkin Technical Analysis 5 01-17-2010 12:55 PM
Alerts From Different Indicators! kamakazy Coding Forum 3 08-17-2009 08:54 AM
Debugging Questions... Phantom Alerts... daedalus Coding Forum 3 06-25-2009 11:17 AM
I Want Alerts Based on Specific Parameters? Johnson S. Mcdermott Trading and the Markets 5 06-08-2009 04:39 PM
Quote Tracker Paintbar Alerts? cbratton Tools of the Trade 0 01-08-2009 06:31 PM

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