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

Notification

Icon
Error

Options
Go to last post Go to first unread
mifer  
#1 Posted : Tuesday, March 23, 2010 5:51:30 AM(UTC)
mifer

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 3/23/2010(UTC)
Posts: 3

formula is standard crossover formula: If((C*.97)>PREV,C*.97,If((C*1.03)
wabbit  
#2 Posted : Tuesday, March 23, 2010 7:02:29 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's the rest of the code?


wabbit [:D]

mifer  
#3 Posted : Tuesday, March 23, 2010 7:08:32 AM(UTC)
mifer

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 3/23/2010(UTC)
Posts: 3

interesting,5 times,i tried and i rewrite full formula,but it doesnt appear:( i can't understand,i copy paste and only the half of this formula appear...it is in the system tester,it name "PS Percentage Crossover 3%"...
wabbit  
#4 Posted : Tuesday, March 23, 2010 8:53:48 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 understand how the code works?

When I see a plethora of PREV functions then I normally don't even bother wasting my time thinking how to write MSFL to remove these recursive functions, I usually just start writing an add-in function for myself. If you don't have the MDK and therefore cannot write your own function library, then you will have to analyse and reason what the code is trying to do, and then find a better way to achieve the aim.

In this instance, although I think it might be possible to reconstruct the logic sans-PREV, I would probably have to think about it a bit more than I have, but I have seen a way to easily eliminate two of the PREV's:

Code:

pct:=3;

aa:=C*(1-pct/100);
bb:=C*(1+pct/100);

x:=Min(Max(aa,PREV),bb);

{plot}
x;




Hope this helps.

wabbit [:D]

mifer  
#5 Posted : Tuesday, March 23, 2010 10:06:45 AM(UTC)
mifer

Rank: Newbie

Groups: Registered, Registered Users, Subscribers
Joined: 3/23/2010(UTC)
Posts: 3

thanks wabbit...only "one PREV" in a formula is better than "three PREV" in a formula...now i try to understand,how the code works and how do you write some add-in functions and eliminate unnecessary prev's.. i have mdk but,i can't write this formula,thank you...
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.