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

Notification

Icon
Error

Options
Go to last post Go to first unread
tokyojoe  
#1 Posted : Monday, October 28, 2013 3:22:56 PM(UTC)
tokyojoe

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/28/2013(UTC)
Posts: 2

It would be good if you could help me with a really simple formula. I am currently system testing end of day data based on the stock reaching a 20 day high using:

H > Ref(HHV(H, 20), -1)

In addition to the formula identifying 20 days highs, I would also like it to include:

1) Where the close of the stock was also greater than the 25 day simple moving average and

2) The 25 day simple moving average was greater than the 350 day moving average (note: with this I am not looking for a moving average crossover, just that the 25 is > than the 350).

I have tried writing the first bit of the formula and (1) but it keeps on rejecting it. If possible, please could you help be writing all out so that I only have to copy and paste the whole lot into the system tester. Thank you!

henry1224  
#2 Posted : Monday, October 28, 2013 8:38:27 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)
[code]A1:=If( H > Ref(HHV(H, 20), -1),1,If(L<Ref(LLV(L,20),-1),-1,0));FastMA:=Mov(C,25,S);SlowMA:=Mov(C,350,S); A2:=If(C>FastMA,1,If(C<FastMA,-1,0));A3:=If(FastMA>SlowMA,1,If(FastMA<SlowMA,-1,0));A1+A2+A3; if the value =3 that is for the result that you were looking for If the value =-3 then it is the exact opposite condition I would copy and paste it into an indicator first and when you load the bars in the chart, I would load about 2000 bars minimum /code*
tokyojoe  
#3 Posted : Tuesday, October 29, 2013 3:15:07 PM(UTC)
tokyojoe

Rank: Newbie

Groups: Registered, Registered Users
Joined: 10/28/2013(UTC)
Posts: 2

Henry many thanks for your help with this, I'll give this a try. Much appreciated
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.