logo
Welcome Guest! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
minnamor  
#1 Posted : Saturday, February 3, 2007 1:35:58 PM(UTC)
minnamor

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 4/27/2005(UTC)
Posts: 126
Location: Italy

The following system based of FT Fixed and Dynamic Balance Point plots ok as both an indicator and an expert but gives nul results in system tester (latch omitted below).

Mc1:=BarsSince(DayOfWeek()=1);
Fc1:=BarsSince(DayOfWeek()=5);
Fc2:=Ref(BarsSince(DayOfWeek()=5),-1)-1;
{Fixed Balance Point Calculation}
FBC:=If(Mc1=0 AND Fc1>2,
{then}(Ref(HHV(H,LastValue(mc1)),-1)+
Ref(LLV(L,LastValue(Mc1)),-1)+
Ref(C,-1))/3,
{else}If(Fc1=0 AND Mc1>5,
{then}(HHV(H,LastValue(Fc2))+
LLV(L,LastValue(Fc2))+C)/3,
{else}If(Fc1=0,
{then}(HHV(H,LastValue(Mc1))+
LLV(L,LastValue(Mc1))+C)/3,
{else}0)));
{Fixed Balance Point Plot}
FBP:=ValueWhen(1,FBC>0,FBC);
FPS:=
(ValueWhen(1,FBC>0,FBC) +
ValueWhen(2,FBC>0,FBC) +
ValueWhen(3,FBC>0,FBC) +
ValueWhen(4,FBC>0,FBC) +
ValueWhen(5,FBC>0,FBC))/5;

LE:= Fps>Ref(Fps,-5) AND C>FBP;
SE:= Fps<Ref(Fps,-5) AND C<FBP;
LX:= C<FBP;
SX:= C>FBP;

The message received in System Tester is "Invalid time period (zero or negative) passed to HHV() function". Any ideas how this could be rectified and the reason for the discrepancy observed?

Thanks and regards.

Maurizio

Jose  
#2 Posted : Saturday, February 3, 2007 11:52:26 PM(UTC)
Jose

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 1/19/2005(UTC)
Posts: 1,065
Location: Koh Pha-Ngan, Earth

Was thanked: 2 time(s) in 2 post(s)
Maurizio, plot your code as an indicator below any chart (using the LE;-LX signals), and you'll clearly see that this is not worth spending any time on. jose '-)
Users browsing this topic
Guest (Hidden)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.