Welcome to the Traders Laboratory Forums.
Beginners Forum Interested in trading but don't know where to start? Post any questions you may have here.

Reply
Old 10-07-2008, 11:46 AM   #9

Blu-Ray's Avatar

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

Thanks: 164
Thanked 292 Times in 105 Posts

Re: Need Help On Tradestation

Hi Tasuki

No, it had no sound, I recorded it through snagit and I don't think it allows for sound.

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
The Following User Says Thank You to Blu-Ray For This Useful Post:
Tasuki (10-07-2008)
Old 10-09-2008, 03:45 PM   #10

Join Date: Nov 2007
Location: Chicago
Posts: 12
Ignore this user

Thanks: 1
Thanked 1 Time in 1 Post

Re: Need Help On Tradestation

Well, you TS gurus were very helpful to me the other day and so I started to work on a MACD code to change the colors of the MACD when it is greater than the MACDAVG. I have attached what I have so far but it will not verify. It gives me a grammar error stating that it expects "(" at the place where my >= operator is. Can you suggest what I have missed?







Code:
[LegacyColorValue = true]; 

{ CW MACD }


inputs: 
	FastLength( 12 ), 
	SlowLength( 26 ), 
	MACDLength( 9 ) ; 

Plot1( MACD( Close, FastLength, SlowLength ), "MACD", Red ) ;
Plot2( XAverage( Plot1, MACDLength ), "MACDAvg", White ) ;
Plot4( 0, "ZeroLine", Yellow) ;

if MACD >= XAverage then SetPlotColor (1,Cyan);
Attached Thumbnails
Need Help On Tradestation-macd-color.jpg  
buysell84 is offline  
Reply With Quote
Old 10-09-2008, 05:15 PM   #11

Blu-Ray's Avatar

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

Thanks: 164
Thanked 292 Times in 105 Posts

Re: Need Help On Tradestation

Quote:
Originally Posted by buysell84 »
Well, you TS gurus were very helpful to me the other day and so I started to work on a MACD code to change the colors of the MACD when it is greater than the MACDAVG. I have attached what I have so far but it will not verify. It gives me a grammar error stating that it expects "(" at the place where my >= operator is. Can you suggest what I have missed?







Code:
[LegacyColorValue = true]; 

{ CW MACD }


inputs: 
	FastLength( 12 ), 
	SlowLength( 26 ), 
	MACDLength( 9 ) ; 

Plot1( MACD( Close, FastLength, SlowLength ), "MACD", Red ) ;
Plot2( XAverage( Plot1, MACDLength ), "MACDAvg", White ) ;
Plot4( 0, "ZeroLine", Yellow) ;

if MACD >= XAverage then SetPlotColor (1,Cyan);

This part is the culprit.

if MACD >= XAverage then SetPlotColor (1,Cyan);

As that sentence is saying if MACD is greater or equals to an xaverage, but it's not stating an xaverage of what.

Here's how it should look:

if MACD >= XAverage( Plot1, MACDLength ) then SetPlotColor (1,Cyan);

Hope this helps

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 10-09-2008, 05:34 PM   #12

Join Date: Nov 2007
Location: Chicago
Posts: 12
Ignore this user

Thanks: 1
Thanked 1 Time in 1 Post

Re: Need Help On Tradestation

Blu-Ray,

Thanks for your responce. I made the change to the code as you suggested but it still gives the error message when trying to verify that it is expecting "(" at the >= operator. In all the code I looked at to try to do this I don't recall that I have see the operators in (). What is this trying to tell me?
buysell84 is offline  
Reply With Quote
Old 10-09-2008, 06:00 PM   #13

Blu-Ray's Avatar

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

Thanks: 164
Thanked 292 Times in 105 Posts

Re: Need Help On Tradestation

Quote:
Originally Posted by buysell84 »
Blu-Ray,

Thanks for your responce. I made the change to the code as you suggested but it still gives the error message when trying to verify that it is expecting "(" at the >= operator. In all the code I looked at to try to do this I don't recall that I have see the operators in (). What is this trying to tell me?

Yes, sorry, my apologies, I didn't read it correctly, again it's a fault as it just says MACD without the bit afterwards:

Here this should work:


if MACD( Close, FastLength, SlowLength ) >= XAverage( Plot1, MACDLength ) then SetPlotColor (1,Cyan);


Personally I would have coded it up like this and it would have saved you a bit of trouble.

[LegacyColorValue = true];

{ CW MACD }


inputs:
FastLength( 12 ),
SlowLength( 26 ),
MACDLength( 9 ) ;

Vars:
MyMACD(0),MACDAvg(0);

MyMACD = MACD( Close, FastLength, SlowLength );
MACDAvg = XAverage(MyMACD, MACDLength );

Plot1( MyMACD,"MACD", Red ) ;
Plot2( MACDAvg,"MACDAvg", White ) ;
Plot4( 0, "ZeroLine", Yellow) ;

if MyMACD >= MACDAvg then SetPlotColor (1,Cyan);



Hope this helps

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 10-09-2008, 07:14 PM   #14

Join Date: Nov 2007
Location: Chicago
Posts: 12
Ignore this user

Thanks: 1
Thanked 1 Time in 1 Post

Re: Need Help On Tradestation

Blue-Ray,

That was fab. I used your code because it is much more elegant. I have a lot to learn.

Have a look at the file I attached. You can see where the MACD crossed the Avg line but doesn't change color immediately. I am guessing this has to do with the previous bar. Is there coding I can use to have the plot change so that it is spot on the cross over? I appreciate this very much and will be willing to post this indicator is anyone is interested.
Attached Thumbnails
Need Help On Tradestation-macd-color.jpg  
buysell84 is offline  
Reply With Quote
Old 10-10-2008, 09:36 AM   #15

Blu-Ray's Avatar

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

Thanks: 164
Thanked 292 Times in 105 Posts

Re: Need Help On Tradestation

You are not going to get it to change immediately as the MACDAvg could be sitting it between the values of the MACD of now & previous bar.


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

Last edited by Blu-Ray; 10-10-2008 at 09:57 AM.
Blu-Ray 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 Securities nosast Beginners Forum 7 03-18-2007 08:52 AM
Tradestation backfill dalby Brokers and Data Feeds 0 03-10-2007 08:09 PM
Tradestation with DTN feed dupaski Technical Analysis 0 03-05-2007 10:23 PM
TradeStation Matrix: Do You Like It? GCB Brokers and Data Feeds 3 02-25-2007 09:25 AM
Tradestation TinGull Brokers and Data Feeds 9 01-11-2007 03:29 PM

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