[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Value question



PureBytes Links

Trading Reference Links

john Davis wrote:
> Below is an angle finder that I made that prints
> text each bar.

Just to be specific, it looks to me like you only want
it to print when your condition is met. Not on each
bar.

>Can anyone tell me why condition1 is recognized and
>condition 2 will not? the added command does nothing,
>it still prints like condition 1. 

Your begin statement only contains "Condition1".

if condition1 then begin              
S = TEXT_NEW(DATE,TIME,HIGH-3,"30");
end;

Also, since the logic of condition1 is contained in
condition2, why not just combine them? 

Value2's length reference was a little FUBAR as well.
I corrected it from "Length3" to Length1.

Try this,

{*************************************************}
input:  AvLen(20), NumBars(1), length1(3);
vars: Price(0), s(0);

Price = Average(c,AvLen);
value1 = (arctangent((Price-Price[NumBars])/NumBars));
value2 = (LinearRegValueFC(Price, Length1, 0));

condition1 = value1 > 30 and value2 > value2[1] ;

if condition1 then begin   
	           
S = TEXT_NEW(DATE,TIME,HIGH-3,"30");

end;



Cheers,

Lance