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

Notification

Icon
Error

Options
Go to last post Go to first unread
DADABE  
#1 Posted : Sunday, August 7, 2005 6:15:48 PM(UTC)
DADABE

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/19/2005(UTC)
Posts: 39

Hi, ever neophyt I am . My exit trigger is simple : Cross(MACD(),Mov(MACD(),8,E)) but it exit too early . Will somebody tell me how exit later with the same or another trigger ? Thanks, Pierre
StorkBite  
#2 Posted : Monday, August 8, 2005 3:32:01 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Hey Dadabe- Check out the REF() function in the user's manual and in the Primer. It sounds like it might help you out. If I understand your question right, you just want to shift the signal that is being generated. try this: a:=Cross(MACD(),Mov(MACD(),8,E)); b:=Ref(Cross(MACD(),Mov(MACD(),8,E)),-1); a;b; Also, look at this code to see the differences: a:=Mov(Ref(C,-1),5,S); b:=Mov(C,5,S); a;b; I think that this might help answer your other question regarding timing too. g_ :D
DADABE  
#3 Posted : Monday, August 8, 2005 4:42:25 PM(UTC)
DADABE

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/19/2005(UTC)
Posts: 39

Hi, I'ts a likable answer to my question . To day, I've got another problem with programming TRADESIM . The formula under exit well from Editor but don't enter in TradeSim . I don't find my error : EntryPrice := C; EntryTrigger := L> L-1 AND L-1> L-2 ; ExitPrice :=C; ExitTrigger := H< H-1 AND H< H-1 AND H-1< H-2 ; InitialStop:=0; {optional initial stop used } NewEntryPrice := C;{entry price at next days open} NewEntryTrigger := Ref(EntryTrigger,-1); NewExitPrice := C;{exit price at next days open} NewExitTrigger := Ref(ExitTrigger,-1); ExtFml( "TradeSim.Initialize"); ExtFml( "TradeSim.RecordTrades","01-My system",LONG ,NewEntrytrigger , NewEntryPrice, InitialStop, NewExitTrigger, NewExitPrice,START ); Best regards, Pierre
StorkBite  
#4 Posted : Monday, August 8, 2005 9:10:45 PM(UTC)
StorkBite

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 3/19/2005(UTC)
Posts: 2,995

Was thanked: 14 time(s) in 10 post(s)
Since I'm not at all familiar with TradeSim, someone else will need to jump in and probably follow this through, but I do see that there is a redundant statement in your ExitTrigger code:
Quote:
ExitTrigger := H< H-1 AND H< H-1 AND H-1< H-2 ;
I believe it can be reduced to this: ExitTrigger:= H< H-1 AND H-1< H-2;
DADABE  
#5 Posted : Tuesday, August 9, 2005 3:42:06 AM(UTC)
DADABE

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 6/19/2005(UTC)
Posts: 39

Thanks, I'ts wonderfull the Metastock world . I'll work with Formula Primer I've found here as you said me . Best regards, Pierre
Jose  
#6 Posted : Tuesday, August 9, 2005 6:53:56 AM(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)
Pierre wrote:
I don't find my error : EntryTrigger := L> L-1 AND L-1> L-2 ; ExitPrice :=C; ExitTrigger := H< H-1 AND H< H-1 AND H-1< H-2 ;
Pierre, try this: [code:1:a11054e0fc]EntryTrigger:=L>Ref(LLV(L,2),-1); ExitPrice:=C; ExitTrigger:=H<Ref(HHV(H,2),-1); [/code:1:a11054e0fc] jose '-) http://metastocktools.com/#metastock .
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.