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

Notification

Icon
Error

Options
Go to last post Go to first unread
gnohnum  
#1 Posted : Thursday, January 6, 2005 2:40:38 AM(UTC)
gnohnum

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/22/2004(UTC)
Posts: 8
Location: Malaysia

i'd like to use MA as trend and oscillator as time to enter market. For example, if 5d MA line cross above 20d and 10d MA line, it's a bull trend, then i know i'll enter the market on long instead of short and i'll use oscillator to time the entry. if osc is 50% and pointing up then enter market and when osc fall below 70% exit the market. actually i wanted to set my exit rule to as long as it's reversing then exit, but i'm not sure the sytem support it and also the line is pointing up and down thing. Can anyone help to write something above? besides, i'm not sure metastock can do alert like when there's a reversal patterns based on candlestick at certain fibonacci retracement? pls tel me whether i can set it using the expert system or explorer...If so, how? I've come across another back test system giving above 100% return. Im not sure if the back test system I set is wrong coz mine only giving the most 10% return when i back tested with formulas like above... And how can i incur commision in back test system?
Patrick  
#2 Posted : Friday, January 7, 2005 7:59:39 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
[quote=MORE" button, unless you are not using metastock version 9. For your first formula, it should be pretty simple. You may want to try the following in either an expert, a system or an exploration : {EnterLong} BullTrend:=Cross(Mov(C,5,S),Max(Mov(C,10,S),Mov(C,20,S))); BearTrend:=Cross(Min(Mov(C,10,S),Mov(C,20,S)),Mov(C,5,S)); Trend:=If(Barssince(Ref(BullTrend,-1))<Barssince(Ref(BearTrend,-1)),1,-1); EnterLong:=Trend=1 and {your oscillator condition here}; ExitLong:=Trend=1 and {your oscillator condition here}; EnterShort:=Trend=-1 and {your oscillator condition here}; ExitShort:=Trend=-1 and {your oscillator condition here}; EnterLong and Barssince(ref(EnterLong,-1))>Min(Barssince(Ref(ExitLong,-1)),Min(Barssince(Ref(EnterShort,-1)),Barssince(Ref(ExitShort,-1)))) This is an example and might not be completely accurate but it should help you create your system/expert. Let me know if you need any help with it. Regarding the system based on fibonnacci lines, I unfrotunately do not have any idea on how to do it
gnohnum  
#3 Posted : Wednesday, January 12, 2005 6:20:32 AM(UTC)
gnohnum

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/22/2004(UTC)
Posts: 8
Location: Malaysia

MORE" button, unless you are not using metastock version 9.[/quote wrote:
I'm not using version 9, u meant only version 9 can do it?
Quote:
{EnterLong} BullTrend:=Cross(Mov(C,5,S),Max(Mov(C,10,S),Mov(C,20,S))); BearTrend:=Cross(Min(Mov(C,10,S),Mov(C,20,S)),Mov(C,5,S)); Trend:=If(Barssince(Ref(BullTrend,-1))<Barssince(Ref(BearTrend,-1)),1,-1); EnterLong:=Trend=1 and {your oscillator condition here}; ExitLong:=Trend=1 and {your oscillator condition here}; EnterShort:=Trend=-1 and {your oscillator condition here}; ExitShort:=Trend=-1 and {your oscillator condition here}; EnterLong and Barssince(ref(EnterLong,-1))>Min(Barssince(Ref(ExitLong,-1)),Min(Barssince(Ref(EnterShort,-1)),Barssince(Ref(ExitShort,-1))))
Can you help me on writing the oscillator condition formula? My condition is Buy signals occur when both SI values have been below 25 and then cross above it. Sell signals occur when both SI values have been above 75 and then cross below it. If a sell occurs and both SI values cross back above 75, then another buy signal occurs and vice versa for sell signals
Patrick  
#4 Posted : Wednesday, January 12, 2005 3:49:02 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
If you have the formula in another language, yes post it here and we will try to convert it to MetaStock's language. Especially if it gives 100% return :D
Quote:
I'm not using version 9, u meant only version 9 can do it?
No other versions can do it but it is done differently, I think you need to click on tools, system tester and then options.
Quote:
Can you help me on writing the oscillator condition formula?
Is this the same as the one you are going to post in another language or is it different request ? sorry if I'm being thick :oops:
gnohnum  
#5 Posted : Thursday, January 13, 2005 3:10:10 AM(UTC)
gnohnum

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/22/2004(UTC)
Posts: 8
Location: Malaysia

Haha...I'm sure u know there's no 100% guarantee winning formula, what I meant was the return in high percentage as per the amount you invested. :wink: I got this from a book, in fact it's saying that it gives more than 400% return when back tested. I'm not sure if this's because the system works differently for other software and the number they give is higher. Maybe you can help to verify for me and pls post it back to me in metastock language after you've translate it. :oops: btw, can you help me to write the oscillator condition formula that I posted earlier? It's not the 100% formula but a friend told me that a simple formula work best and I just wan't to see if this's true. Thanks.
Patrick  
#6 Posted : Thursday, January 13, 2005 4:06:58 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
ouch, looks like an easy one ... let me take a look at it and I will post the formulae sometime tomorrow. 8)
gnohnum  
#7 Posted : Friday, January 14, 2005 2:03:57 AM(UTC)
gnohnum

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/22/2004(UTC)
Posts: 8
Location: Malaysia

Thanks. Awaiting your posting then. Can you help me on 1 more formula? Sorry, because I in learning process now so will have a lot of questions and need to try out a lot of the formulas. Is it possible to do a formula/writing in system that to say if the Stochastic's %K cross %D and %D cross %K? Thanks.
Patrick  
#8 Posted : Friday, January 14, 2005 6:42:50 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
Quote:
Is it possible to do a formula/writing in system that to say if the Stochastic's %K cross %D and %D cross %K?
I'm using 14,3,3 but you can replace these values. {Cross %k Above %D} K:=14; Kslowing:=3; D:=3; StoK:=Stoch(K,Kslowing); stoD:=Mov(Stoch(K,Kslowing),D,S); Cross(StoK,StoD) {Cross %D Above %K} K:=14; Kslowing:=3; D:=3; StoK:=Stoch(K,Kslowing); stoD:=Mov(Stoch(K,Kslowing),D,S); Cross(StoD,StoK)
Patrick  
#9 Posted : Friday, January 14, 2005 6:46:33 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
in your file there is actually 2 systems. I worked on the first one, but it won't be possible to make it exactly the same without version 9. As there are entry prices variables. What the system does is buy when this happens : RANGE BREAKOUT ATRBars:=3; {Length of Average TrueRange} ATRMult:=0.62; {Multiplier for ATR (Volatility Factor)} MOMBars:=28; {Length of Momentum Indicator} MOMBack:=10; {Length of Momentum LookBack Period} ATRVal:=ATR(ATRBars)*ATRMult; MOMVal:=Mom(C,MOMBars); MOMTrnd:=If(MOMVal>Ref(MOMVal,-MOMBack),1,-1); lePrice:=If(MOMTrnd>0,H+ATRVal,C+ATRVal); sePrice:=If(MOMTrnd<0,L-ATRVal,C-ATRVal); Cross(MOMTrnd,0) AND buys at the value of the lePrice variable Also it tells you to sell when this happens : ATRBars:=3; {Length of Average TrueRange} ATRMult:=0.62; {Multiplier for ATR (Volatility Factor)} MOMBars:=28; {Length of Momentum Indicator} MOMBack:=10; {Length of Momentum LookBack Period} ATRVal:=ATR(ATRBars)*ATRMult; MOMVal:=Mom(C,MOMBars); MOMTrnd:=If(MOMVal>Ref(MOMVal,-MOMBack),1,-1); lePrice:=If(MOMTrnd>0,H+ATRVal,C+ATRVal); sePrice:=If(MOMTrnd<0,L-ATRVal,C-ATRVal); Cross(0,MOMTrnd) AND sells at the value of the sePrice variable I will take a look at the other one later
Patrick  
#10 Posted : Friday, January 14, 2005 7:10:32 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
To get back to the first request :oops:
Quote:
Buy signals occur when both SI values have been below 25 and then cross above it. Sell signals occur when both SI values have been above 75 and then cross below it.
The problem I see with this is that your first condition is also a cross. Plus I might be having a bad day because I do not remember what SI stands for. Also make sure to provide me with the periods to use with that SI. ( Do you mean RSI ? )
gnohnum  
#11 Posted : Saturday, January 15, 2005 2:35:20 AM(UTC)
gnohnum

Rank: Newbie

Groups: Registered, Registered Users
Joined: 11/22/2004(UTC)
Posts: 8
Location: Malaysia

Oops...I'm sorry, SI is Stochastic Indicator. :oops: As for the period, I cannot remember it now coz I've set it in my system and I'm not using my own system now. But I think I'm using the common 14-days. Thanks for the formulas, I'll test it out this weekend. :D
Patrick  
#12 Posted : Tuesday, January 18, 2005 3:48:08 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
{Enter Long} BullTrend:=Cross(Mov(C,5,S),Max(Mov(C,10,S),Mov(C,20,S))); BearTrend:=Cross(Min(Mov(C,10,S),Mov(C,20,S)),Mov(C,5,S)); Trend:=If(BarsSince(Ref(BullTrend,-1))<BarsSince(Ref(BearTrend,-1)),1,-1); EnterLong:=Trend=1 AND Cross(Stoch(14,3),25); ExitLong:=Trend=1 AND Cross(75,Stoch(14,3)); EnterShort:=Trend=-1 AND Cross(75,Stoch(14,3)); ExitShort:=Trend=-1 AND Cross(Stoch(14,3),25); Status:=If(EnterLong,2,If(EnterShort,-2,If(ExitLong,1,If(ExitShort,-1,PREV)))); EL:=Cross(Status,1.5); XL:=Cross(1.5,Status) AND Ref(Status,-1)=2; ES:=Cross(-1.5,Status); XS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2; EL {Exit Long} BullTrend:=Cross(Mov(C,5,S),Max(Mov(C,10,S),Mov(C,20,S))); BearTrend:=Cross(Min(Mov(C,10,S),Mov(C,20,S)),Mov(C,5,S)); Trend:=If(BarsSince(Ref(BullTrend,-1))<BarsSince(Ref(BearTrend,-1)),1,-1); EnterLong:=Trend=1 AND Cross(Stoch(14,3),25); ExitLong:=Trend=1 AND Cross(75,Stoch(14,3)); EnterShort:=Trend=-1 AND Cross(75,Stoch(14,3)); ExitShort:=Trend=-1 AND Cross(Stoch(14,3),25); Status:=If(EnterLong,2,If(EnterShort,-2,If(ExitLong,1,If(ExitShort,-1,PREV)))); EL:=Cross(Status,1.5); XL:=Cross(1.5,Status) AND Ref(Status,-1)=2; ES:=Cross(-1.5,Status); XS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2; XL {Enter Short} BullTrend:=Cross(Mov(C,5,S),Max(Mov(C,10,S),Mov(C,20,S))); BearTrend:=Cross(Min(Mov(C,10,S),Mov(C,20,S)),Mov(C,5,S)); Trend:=If(BarsSince(Ref(BullTrend,-1))<BarsSince(Ref(BearTrend,-1)),1,-1); EnterLong:=Trend=1 AND Cross(Stoch(14,3),25); ExitLong:=Trend=1 AND Cross(75,Stoch(14,3)); EnterShort:=Trend=-1 AND Cross(75,Stoch(14,3)); ExitShort:=Trend=-1 AND Cross(Stoch(14,3),25); Status:=If(EnterLong,2,If(EnterShort,-2,If(ExitLong,1,If(ExitShort,-1,PREV)))); EL:=Cross(Status,1.5); XL:=Cross(1.5,Status) AND Ref(Status,-1)=2; ES:=Cross(-1.5,Status); XS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2; ES {Exit Short} BullTrend:=Cross(Mov(C,5,S),Max(Mov(C,10,S),Mov(C,20,S))); BearTrend:=Cross(Min(Mov(C,10,S),Mov(C,20,S)),Mov(C,5,S)); Trend:=If(BarsSince(Ref(BullTrend,-1))<BarsSince(Ref(BearTrend,-1)),1,-1); EnterLong:=Trend=1 AND Cross(Stoch(14,3),25); ExitLong:=Trend=1 AND Cross(75,Stoch(14,3)); EnterShort:=Trend=-1 AND Cross(75,Stoch(14,3)); ExitShort:=Trend=-1 AND Cross(Stoch(14,3),25); Status:=If(EnterLong,2,If(EnterShort,-2,If(ExitLong,1,If(ExitShort,-1,PREV)))); EL:=Cross(Status,1.5); XL:=Cross(1.5,Status) AND Ref(Status,-1)=2; ES:=Cross(-1.5,Status); XS:=Cross(Status,-1.5) AND Ref(Status,-1)=-2; XS
Patrick  
#13 Posted : Tuesday, January 18, 2005 7:22:50 PM(UTC)
Patrick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 9/8/2004(UTC)
Posts: 2,266

Was thanked: 1 time(s) in 1 post(s)
I believe the Formula for the second system is : {Enter Long} HiVal:=Mo(H,10); LoVal:=Mo(L,10); RnVal:=Mo(H-L,6); BC:=Cross(Min(HiVal,LoVal),RnVal); SC:=Cross(RnVal,Max(HiVal,LoVal)); BC AND BarsSince(Ref(BC,-1))>BarsSince(Ref(SC,-1)) {Enter Short} HiVal:=Mo(H,10); LoVal:=Mo(L,10); RnVal:=Mo(H-L,6); BC:=Cross(Min(HiVal,LoVal),RnVal); SC:=Cross(RnVal,Max(HiVal,LoVal)); SC AND BarsSince(Ref(BC,-1))<BarsSince(Ref(SC,-1)) They also use a trailing stop at 10%
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.