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

Notification

Icon
Error

Options
Go to last post Go to first unread
hayseed  
#1 Posted : Monday, May 15, 2006 5:45:26 AM(UTC)
hayseed

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 3/7/2005(UTC)
Posts: 1,346

a few might remember the logic problem involving 12 pingpong balls where only 1 was an odd weight.... in 3 tries with only simple balance scale the goal was to identify the 1 odd weight and say if it was heavier or lighter.... the solution involves doing 1 action that effectively provides multiple insights.... henry has a subtle habit of that same type logic.... have you noticed that at times he uses red or green for formula names.... that 1 action effectively provides multiple insights.... obviously first it provides a name but also second at a quick glance we can focus in on that specific line of code for up or down component of the graph.... ghost today had a question involving histograms.... just below here would have been my answer .... my method , which is seen in anything i've posted, would have been to use 'a' , 'aa', 'aaa' and so on such as, a:=((c+2*std(c,20) - mov(c,20,s)) / (4*std(c,20)))*4 - 2; aa:=if(a>=ref(a,-1),a,0); aaa:=if(a<ref(a,-1),a,0); 2;0;-2;aa;aaa; at first there was an error in my 'to be' green line..... to be honest i had to look several times to decipher which code was for the 'to be' green line.... even though i had just seconds before written it.... just imagine the difficulty had the code been 20 lines long and something written last week....... now here is henry's code presented today.... the use of red/green is,,,, well, even a hayseed can see the vast improvement and he is rewriting formulas at this moment...... [code:1:703700248d]A:=((C+2*Std(C,20) - Mov(C,20,S)) / (4*Std(C,20)))*4 - 2; Green:=If(A>=Ref(A,-1),A,0); Red:=If(A<Ref(A,-1),A,0); 2;0;-2;Green;Red; [/code:1:703700248d] speaking of color, when using multiple binary type waves in histogram style we must take care in placement of the final 'plot' lines of code and their intended value.... if not, the longer lines might overshadow the shorter lines when several are valid on the same bar.... to assure no overshadowing in the code below and to keep the a,b,d' in ascending order, i have the intended values for each, 5,4,3 in descending order..... the same care applies to the , -5,-4,-3 and so on.... swap places with the a; and d;, you'll see what i mean..... so if several of your conditions should be true but the lines appear missing, check for overshadowing...... and btw, if your here in the states, now might be a good time to focus on those pingpong mac sums...... its your serve.....h [code:1:703700248d]a:=If(Cross(MACD(),Mov(MACD(),9,E)),5,0); {bullish macd cross} aa:=If(Cross(Mov(MACD(),9,E),MACD()),-5,0); {bearish macd cross} b:=If(Cross(Stoch(5,3),Mov(Stoch(5,3),3,S)),4,0); bb:=If(Cross(Mov(Stoch(5,3),3,S),(Stoch(5,3))),-4,0); x:= (H+L)/2 ; ao:= Mov(x,3,W)-Mov(x,34,W); d:=If(Cross(ao,Mov(ao,3,S)),3,0); dd:=If(Cross(Mov(ao,3,S),ao),-3,0); a; b; d; aa; bb; dd;[/code:1:703700248d]
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.