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

Reply
Old 03-21-2009, 02:35 AM   #1

Join Date: Nov 2008
Location: Kialla
Posts: 55
Ignore this user

Thanks: 16
Thanked 1 Time in 1 Post

Coding Help

I am having trouble getting this to work.

1) LineA sloping down
2) C<xAvg

If either of these are true go test for all the others and if they are true give me the plot.

Any ideas....thanks

{************* Showme Study **************}
{Continuation Sell}
IF((LineA <= LineA[1])or Close < xAvg and
(oSlowK[1]>OverSold and oSlowK[1]>oSlowD and oSlowK<oSlowK[1] then begin
Plot6(H,"DnColor",Dncolor );
end
else begin
PeterBrazel is offline  
Reply With Quote
Old 03-21-2009, 02:56 AM   #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: Coding Help

how to think clearly when coding:

1. do one thing at a time
2. write out ONE action at a time
3. write out ONE action per sentence
4. write out ONE sentence per line
5. match every BEGIN with an END



Code:
{************* Showme Study **************}
{Continuation Sell}

IF LineA <= LineA[1] 
or Close < xAvg
then 
begin

	if oSlowK[1]>OverSold 
	and oSlowK[1]>oSlowD 
	and oSlowK<oSlowK[1] 
	then 
	begin
		Plot6(H,"DnColor",Dncolor );
	end;
end
else
Tams is offline  
Reply With Quote
Old 03-21-2009, 03:04 AM   #3

Join Date: Nov 2008
Location: Kialla
Posts: 55
Ignore this user

Thanks: 16
Thanked 1 Time in 1 Post

Re: Coding Help

Tams,

Thanks but I keep getting this highlighted at the t on the then after xAvg

------ Compiled with error(s): ------
syntax error, unexpected 'then'
errLine 59, errColumn 38, errLineEnd 59, errColumnEnd 38
PeterBrazel is offline  
Reply With Quote
Old 03-21-2009, 03:11 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: Coding Help

have you defined "xAvg" ?
Tams is offline  
Reply With Quote
Old 03-21-2009, 03:18 AM   #5

Join Date: Nov 2008
Location: Kialla
Posts: 55
Ignore this user

Thanks: 16
Thanked 1 Time in 1 Post

Re: Coding Help

Yes

xAvg = XAverage (LineA, LinRegAvg) ;
PeterBrazel is offline  
Reply With Quote
Old 03-21-2009, 07:53 AM   #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: Coding Help

you have mismatched brackets.
Tams is offline  
Reply With Quote
Old 03-21-2009, 02:20 PM   #7

Join Date: Nov 2008
Location: Kialla
Posts: 55
Ignore this user

Thanks: 16
Thanked 1 Time in 1 Post

Re: Coding Help

Sorry cannot see where my brackets are mismatched.
PeterBrazel is offline  
Reply With Quote
Old 03-21-2009, 09:28 PM   #8

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: Coding Help

count them

i see 3x (
and 1x )


{************* Showme Study **************}
{Continuation Sell}
IF((LineA <= LineA[1])or Close < xAvg and
(oSlowK[1]>OverSold and oSlowK[1]>oSlowD and oSlowK<oSlowK[1] then begin
Plot6(H,"DnColor",Dncolor );
end
else begin
Tams 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
Coding for Sierra Charts mishnas Coding Forum 22 06-23-2009 11:16 PM
TICK Coding Help Soultrader Coding Forum 19 04-06-2009 02:28 AM
CQG - Coding Papa Lazarou Coding Forum 4 01-12-2009 08:13 PM
Coding Help waveslider Coding Forum 1 08-03-2007 04:48 PM
[VSA] Coding TinGull Coding Forum 2 03-18-2007 01:05 PM

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