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

Notification

Icon
Error

Options
Go to last post Go to first unread
aksh  
#1 Posted : Thursday, August 7, 2014 11:14:55 AM(UTC)
aksh

Rank: Member

Groups: Registered, Registered Users
Joined: 1/20/2007(UTC)
Posts: 15

Was thanked: 1 time(s) in 1 post(s)
Below is my code for determining the lowest low between dates and then plotting signals of crossover of Close of the LL line in the post LL periods (right side of the LL only). On some charts the signals are plotting correctly within the date range but in other cases the signals are plotting in as well as outside the date range. Outside the date range is before the LL was made (left side of chart).

sd:=
sm:=
sy:=
ed:=
em:=
ey:=

start:=Year()>sy
OR (Year()=sy AND (Month()>sm
OR Month()=sm AND DayOfMonth()>=sd));
end:=Year()<ey
OR (Year()=ey AND (Month()<em
OR Month()=em AND DayOfMonth()<=ed));

lo:=LastValue(Lowest(ValueWhen(1,start and end,L)));

sd:=ValueWhen(1,L=lo,DayOfMonth());
sm:=ValueWhen(1,L=lo,Month());
sy:=ValueWhen(1,L=lo,Year());

start:=Year()>sy
OR (Year()=sy AND (Month()>sm
OR Month()=sm AND DayOfMonth()>=sd));

DnSignals:=Cross(lo,C);
UpSignals:=Cross(C,lo);

-If(start AND DnSignals,DnSignals,0);
If(start AND UpSignals,UpSignals,0);

1) How can I make the signals plot in the date range only?
2) If used in explorer what code should I use to exclude stocks that have started quoting after the first start date.

Thanks in advance.

aksh

Laisze  
#2 Posted : Friday, August 8, 2014 3:07:11 AM(UTC)
Laisze

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 11/18/2007(UTC)
Posts: 96
Location: HK


Good effort.

Here you go.



aksh  
#3 Posted : Sunday, August 10, 2014 8:25:34 AM(UTC)
aksh

Rank: Member

Groups: Registered, Registered Users
Joined: 1/20/2007(UTC)
Posts: 15

Was thanked: 1 time(s) in 1 post(s)
I've seen Jose's website but the problem is not in finding the lowest low but in plotting crossover of lowest low and close cross(lo,C) signals in the post lowest low period only. With my code the signals are plotting before and after the start i.e. before and after the lowest low. See the bottom part of the code:

lo:=LastValue(Lowest(ValueWhen(1,start and end,L)));

sd:=ValueWhen(1,L=lo,DayOfMonth());
sm:=ValueWhen(1,L=lo,Month());
sy:=ValueWhen(1,L=lo,Year());

start:=Year()>sy
OR (Year()=sy AND (Month()>sm
OR Month()=sm AND DayOfMonth()>=sd));

DnSignals:=Cross(lo,C);
UpSignals:=Cross(C,lo);

-If(start AND DnSignals,DnSignals,0);
If(start AND UpSignals,UpSignals,0);

Also how can I exclude newer stocks that have started quoting after the first start date if the above is used in exploratio?


aksh  
#4 Posted : Tuesday, August 19, 2014 2:17:09 AM(UTC)
aksh

Rank: Member

Groups: Registered, Registered Users
Joined: 1/20/2007(UTC)
Posts: 15

Was thanked: 1 time(s) in 1 post(s)
Nobody has replied to my post.

What am I doing wrong and where? Why are the crossover signals plotting outside the date range? Am I making a silly mistake somewhere?

Please look at the code and answer. It's important for me.

aksh
henry1224  
#5 Posted : Thursday, August 21, 2014 1:41:38 PM(UTC)
henry1224

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 10/29/2004(UTC)
Posts: 1,394
Location: Glastonbury, CT

Was thanked: 2 time(s) in 2 post(s)
What are you trying to accomplish with trading only between two dates?
System testing? What ever plots in an expert, will plot correctly on a chart!
The Right Edge of a chart never lies!

The system tester in Metastock can be manipulated. Using Simulations in any formula other than the system is useless. If a formula cannot be used in an expert or exploration or indicator then why use it?
darla  
#6 Posted : Wednesday, September 17, 2014 5:09:40 AM(UTC)
darla

Rank: Newbie

Groups:
Joined: 9/17/2014(UTC)
Posts: 1

It irritates me that I can't use FIRE with MS v13 as I am not crazy with the Sector Stats in v13. Anything that is dependent on frequently Equis updates isn't a good thing in my point of view.

So anytime I am doing stats on sectors I have to run MS v11 and FIRE... I even tried to create an indicator in v13 that called the Breadth indicator but MSX DLL didn't recognized the function.

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.