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

Notification

Icon
Error

Options
Go to last post Go to first unread
Andrabr9  
#1 Posted : Monday, April 7, 2014 2:05:28 AM(UTC)
Andrabr9

Rank: Member

Groups: Registered, Registered Users
Joined: 3/10/2012(UTC)
Posts: 11

I am having difficulties with this simple formula. I want to have a signal that could be used on the SPY 500...

Buy ...Entry

SPY>21 EXMA
SPY has risen 3.5% from the lowest point...
SPY> 200 EXMA

Sell _Exit

SPY<21 EXMA
SPY has fallen 3.5% from the highest point...

Greatly appreciate it...
Andy
wabbit  
#2 Posted : Monday, April 7, 2014 2:48:23 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
What code have you tried?

Andrabr9  
#3 Posted : Monday, April 7, 2014 3:24:01 AM(UTC)
Andrabr9

Rank: Member

Groups: Registered, Registered Users
Joined: 3/10/2012(UTC)
Posts: 11

Thank you...I got stuck on how to write the rebound or fall of 3.5%..as well as not sure about the 200 EXMA aspect...

Probably this is not right either
Mov(C,21,E)>Ref(Mov(C,21,E),-1) AND Ref(Mov(C,21,E),-1)<Ref(Mov(C,21,E),-2)

Mov(C,200,E)>Ref(Mov(C,200,E),-1)

I thought to compare using one moving average is in the above...to 2 moving averages ...for example..
Buy Entry
10EXMA>30EXMA
Both are above 200EXMA
Price increase >3.5% from lowest close

Sell Entry
10EXMA<30EXMA
Price falls>3.5% from highest close

so there are 2 tests...one as in the above...and secondly from the original question...
Greatly appreciate your help...
Best
Andy
Andrabr9  
#4 Posted : Monday, April 7, 2014 3:30:23 AM(UTC)
Andrabr9

Rank: Member

Groups: Registered, Registered Users
Joined: 3/10/2012(UTC)
Posts: 11

Thank you for your help...
I tried Mov(C,21,E)>Ref(Mov(C,21,E),-1) AND Ref(Mov(C,21,E),-1)<Ref(Mov(C,21,E),-2) but got hung up on the rebound and fall of 3.5% from the highest high or lowest low. As well as the 200EXMA..
So what I would like to see the signals...
Buy Entry
close>21 EXMA
close>200EXMA
increase of >3.5% from lowest low
Sell Exit
close<21 EXMA
decrease of >3.5% from highest high..

I also thought to compare this to a double moving average
Buy Entry
10EXMA>30 EXMA
Close>200EXMA
increase of >3.5% from lowest low
Sell Exit
10EXMA<30 EXMA
decrease of >3.5% from highest high..

Greatly appreciate your help & guidance



wabbit  
#5 Posted : Monday, April 7, 2014 7:10:12 AM(UTC)
wabbit

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 10/28/2004(UTC)
Posts: 3,111
Location: Perth, Western Australia

Was thanked: 16 time(s) in 16 post(s)
Do you need the price rebounding, or an indicator rebounding?

Depending on precisely what you're trying to achieve, you MIGHT find something useful in the Zig(), Peak() and Trough() functions, but be very aware of their limitations and the fact their use in real life trading systems is very limited, and should be used very cautiously in backtesting.

You may be able to define your rebound definitions using HighestSince() and/or LowestSince(), HHV() and/or LLV().


Andrabr9  
#6 Posted : Tuesday, April 8, 2014 12:23:07 AM(UTC)
Andrabr9

Rank: Member

Groups: Registered, Registered Users
Joined: 3/10/2012(UTC)
Posts: 11

Thank you again for your response...Sorry I was not overly clear. I want to see the price on the index rebound ( increase 3.5% or decrease 3.5%)
Thank you again...

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.