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

Notification

Icon
Error

Options
Go to last post Go to first unread
Derek Worswick  
#1 Posted : Tuesday, September 2, 2014 2:16:28 AM(UTC)
Derek Worswick

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 8/11/2005(UTC)
Posts: 104

Hi

I must be using “ValueWhen” incorrectly as I get unpredictable results

Sometimes it works correctly and sometimes incorrect

I wish to Start Line Pivot Line & Target Line at the date of the LastValue(LLV(Low,Pds))

see screenshot below

Thank you in advance,

Derek

Code:


 Pds:=Input("
Periods ",1,2000,252);

 Pivot:= LastValue(LLV(Low,Pds)); 

 Rg:=(Sqrt((9 + 12* Pivot))+3)/6;

 Inc:=Input("Enter Increment or
Decremnt",-12,100,1.5);

 Target:=(Power((((Rg+Inc)*6)
-3),2) -9)/12;

 Start:=ValueWhen(1,Low=Pivot,Cum(1));

 Pivot:=ValueWhen(1,Start,Pivot);

 Pivot;

 Target:=ValueWhen(1,Start,Target);

 Target;

 
Users browsing this topic
Guest (Hidden)
Similar Topics
ValueWhen() opposite function, such as ValueUntil()? (Formula Assistance)
by Drew 9/19/2015 2:49:48 PM(UTC)
Valuewhen (Formula Assistance)
by lilly 4/14/2014 7:07:26 AM(UTC)
Returning price bar H or L based on HHV in some other parameter - ValueWhen()? (Formula Assistance)
by perth RAT 12/16/2012 10:33:36 PM(UTC)
valuewhen function (Formula Assistance)
by roomyd 9/12/2012 4:36:45 AM(UTC)
Super slow ValueWhen/Prev (Basic Coding Techniques)
by Data 9/25/2009 7:37:11 AM(UTC)
BarsSince, ValueWhen and Custom Formula call in an Expert. (Advanced Coding Techniques)
by marketwatch 2/14/2009 3:04:34 PM(UTC)
Problem with barssince() and valuewhen() (Advanced Coding Techniques)
by FoxerFX 2/13/2009 2:46:39 AM(UTC)
ValueWhen with Hour as Data Array parameter (Formula Assistance)
by andwilson 6/23/2008 7:07:21 PM(UTC)
ValueWhen variable help (Formula Assistance)
by gojuice 2/8/2008 3:23:51 PM(UTC)
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.