in Search

Formula Training - Lesson 4

Last post 07-16-2005, 19:06 by Marilyn. 9 replies.
Sort Posts: Previous Next
  •  07-05-2005, 5:37 4169

    Formula Training - Lesson 4

    It is about 20 minutes ...
    Formula Latches based on Roy Larsen's document

    http://forum.equis.com/Training/FormulaTraining/Lesson4.html

    To Download, right click and select "save target as"

    http://forum.equis.com/Training/FormulaTraining/Lesson4.swf

    I mention a formula with 4 states using the prev function, did not find mine but found this from henry which is exactly like the type of formulae I was talking about.

    Update: Now you can use the ForumDLL latch function to make all this a lot easier ...

    Patrick :mrgreen:
    My Site
  •  07-05-2005, 5:54 4171 in reply to 4169

    Re: Formula Training - Lesson 4

    I was watching the training to make sure it worked and was not to bad.

    Let me add that Roy's solution is interresting because it does not use the prev function.

    Another way of doing the same thing would be to type :

    Buy:=Your formula;
    Sell:=Your formula;
    State:=If(buy,1,If(Sell,-1,PREV));
    State;

    But as you already know using the prev function slows down the calculations and it is better to not use them when possible.

    Patrick :mrgreen:
    My Site
  •  07-05-2005, 6:19 4175 in reply to 4169

    Re: Formula Training - Lesson 4

    Patrick:
    It is about 20 minutes ...
    Formula Latches based on Roy Larsen's document

    http://forum.equis.com/Training/FormulaTraining/Lesson4.html

    To Download, right click and select "save target as"

    http://forum.equis.com/Training/FormulaTraining/Lesson4.swf

    I mention a formula with 4 states using the prev function, did not find mine but found this from henry which is exactly like the type of formulae I was talking about.

    Patrick :mrgreen:



    Patrick, thanks again for this good lesson. I have one question. I'm nog working on a expert with 4 conditions. How do I use the latches now with:

    buy:=
    sell:=
    exitbuy:=
    exitsell:=

    hope you have the answer.
  •  07-05-2005, 6:55 4176 in reply to 4169

    Re: Re: Formula Training - Lesson 4

    Take a look at the second to last post for the exact setup.

    http://forum.equis.com/viewtopic.php?t=226&highlight=state

    Take a look at this formula for an example :

    {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 :mrgreen:
    My Site
  •  07-05-2005, 13:39 4181 in reply to 4169

    Re: Re: Formula Training - Lesson 4

    Hi Patrick,

    Nice work on the training of latches!!!

    Step by step explanation really help in my understanding.

    Zillions of thanks,
    Edwin
  •  07-06-2005, 3:26 4223 in reply to 4169

    Re: Re: Formula Training - Lesson 4

    Thanks Patrick for this lesson. This one is a bit complex for me, even though you make the guts of it look simple. Hopefully I'll be able to work my way up to it in the future. :D
    Traders' Consortium
  •  07-16-2005, 6:56 4680 in reply to 4169

    Re: Re: Formula Training - Lesson 4

    hello patrick sir
    how r u
    i am new to meta stock
    and has seen and downloaded all u r lessons. i really asppreciate u r good work and efforts for thinking andd working for novice users like me. i am grateful to reply to such a great person. really sir thanks alot for all u r efforts.
    sir as i told u i am new to it, i have some questions
    i have got metastock pro 8 end of day
    how can i update it to new metastock, i can't afford new buy

    also i have downloaded all u r lessons
    but lesson 1 works properlky with real player
    lesson 2 and meta stock demo doesnn't wok.
    i installed flash media player and also shockwave player stilll it doesn't work. when i play it with window media player then it says u r security settings does n't allow the same.
    so please guide me if u can
    i have windows xp service pack 2 installed

    waiting for reply thank you
    navneet here
    Thanks & Regards
    Navneet Singhal
    Delhi, India

    E-Mail: navneet.singhal001@gmail.com

    www.navneetsinghal.blogspot.com
  •  07-16-2005, 7:02 4681 in reply to 4169

    lessons now working with quick time player

    sir
    my lessons are now working as i have downloaded the quicktime player
    so lessons problem is solved.

    please reply the other problem. thank u
    navneet
    Thanks & Regards
    Navneet Singhal
    Delhi, India

    E-Mail: navneet.singhal001@gmail.com

    www.navneetsinghal.blogspot.com
  •  07-16-2005, 17:35 4692 in reply to 4169

    Re: lessons now working with quick time player

    Hey Happy-

    Have you checked out this upgrade link? http://www.equis.com/Products/MSP/Upgrade.aspx?. It will tell you what the cost of upgrading will be for your particular product. :D
    Traders' Consortium
  •  07-16-2005, 19:06 4697 in reply to 4169

    Re: lessons now working with quick time player

    You can also check with Viratech directly... their contact info is here http://www.equis.com/Partners/Partner.aspx?p=1009

    If you get it locally you can avoid the shipping charges (or at least our shipping charges). :) M
    "It takes no more time to see the good side of life than it takes to see the bad."
    Jimmy Buffett
View as RSS news feed in XML