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

Notification

Icon
Error

Options
Go to last post Go to first unread
nasdaqtrader  
#1 Posted : Wednesday, November 29, 2006 1:57:14 PM(UTC)
nasdaqtrader

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers, Unverified Users
Joined: 2/2/2005(UTC)
Posts: 307

Thanks: 7 times
Was thanked: 3 time(s) in 3 post(s)

Hope someone can help me with this formula and try it out to see if we both get the same results. It looks confusing to me, I think its not working properly.

Expansion Pivots long

A:=Close
B:{Breakout}(H-L)>ATR(9)
C:{Signal}Ref(C,-2)<=Mov(C,50,S) and
Ref(C,-1)>Mov(C,50,S) OR Ref(C,-1)<=Mov(C,50,S) and
C>Mov(C,50,S)
D:{entry}HHV(H,2)+.125
E:{Stop}If(Ref(C,-2)<=Mov(C,50,S) and
Ref(C,-1)>Mov(C,50,S),Ref(C,-1)-1,If(Ref(C,-1)<=Mov(C,50,S)
and C>Mov(C,50,S),C-1,0))
Filter:ColB and ColC

Expansion Pivots short

A:=Close
B:{Breakout}(H-L)>ATR(9)
C:{Signal}Ref(C,-2)>=Mov(C,50,S) and
Ref(C,-1)<Mov(C,50,S) OR Ref(C,-1)>=Mov(C,50,S) and
C<Mov(C,50,S)
D:{entry}LLV(L,2)-.125
E:{Stop}If(Ref(C,-2)>=Mov(C,50,S) and
Ref(C,-1)<Mov(C,50,S),Ref(C,-1)-1,If(Ref(C,-1)>=Mov(C,50,S)
and C<Mov(C,50,S),C-1,0))
Filter:ColB and ColC

Ex Breakout long

C>Ref(HHV(C,42),-1) AND (H-L)>=Ref(HHV((H-L),9),-1)

To me it seems that the Long are -1 and short is 1 and the short report they look like long trades not short trades.

Thank you

nasdaqtrader


Regards, Frank Koenig Trade Like a Pro Trend is your Friend
wabbit  
#2 Posted : Wednesday, November 29, 2006 6:14:07 PM(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)
nasdaqtrader wrote:
I think its not working properly.

The code works perfectly. The values returned are exactly in accordance with what is coded. I think you mean to say, "I had expected different results, so what is coded is not in accordance with my aspirations." Please try to understand the difference.

Exactly, what are you looking for?
What did you think the code should be returning?
If the code is not returning the expected result, does it never return the expected result or does it sometimes not return the expected result?
(To the programmer, the difference between sometimes getting it wrong and always getting it wrong is massive!)
Who wrote the code?
What were the intentions of the original author?
Were these intentions ever written down in plain language or pseudo-code before being programmed?
How can we tell if the intentions have been accurately programmed?
What system is this part of?
Is there more to the system than just the code presented?
Did you have the right number of bars of data loaded? or is this another "Load Minumum Bars" issue?

Can you give us any more details other than, "it not working"?

nasdaqtrader wrote:
It looks confusing to me

To start with: get rid of the fluffy chaff that is in the exploraton return to see the core code. Columns A, D and E are just data and are not evaluated by the filter condition. I believe you are having issues with the stocks returned by the exploration, which is based on the filter conditions that is columns B and C

Expansion Pivots long

B:{Breakout}(H-L)>ATR(9)
C:{Signal}Ref(C,-2)<=Mov(C,50,S) and Ref(C,-1)>Mov(C,50,S) OR Ref(C,-1)<=Mov(C,50,S) and C>Mov(C,50,S)
Filter:ColB and ColC

Now this is a little cleaner, lets look at the code and perhaps rewirite the columns into the filter condition i.e.
(H-L)>ATR(9) AND
(
Ref(C,-2)<=Mov(C,50,S) AND Ref(C,-1)>Mov(C,50,S)
OR
Ref(C,-1)<=Mov(C,50,S) AND C>Mov(C,50,S)
)

(Operator precedence is important, AND is evaluated before OR)


Looking now at the second part of the criteria (the stuff that used to be in column C) I see some crude attempt at a moving average cross? This is very abstract as the value of the MA is only computed on the last bar and is being compared to the close price over a few bars? Maybe this code is right? It makes no sense but then...

I think the essence of the code is to find a stock which has some volatility criteria and has a close crossing the MA within the last two bars? which is more easily coded as:

{for those people who like the Cross() function, I don't}
(H-L)>ATR(9) AND Alert(Cross(C,Mov(C,50,S),3)

{I prefer}
x:= C>Mov(C,50,S);
(H-L)>ATR(9) AND x AND Alert(x=0,3)



Hope this helps.

wabbit [:D]

Users browsing this topic
Guest (Hidden)
Similar Topics
Formula help for Exploration (Formula Assistance)
by SAINI9466637986 12/24/2023 5:53:23 AM(UTC)
Indicator and System Formula Help! (Formula Assistance)
by emmarsef$ 8/14/2019 7:10:35 AM(UTC)
Simple Formula help (Formula Assistance)
by mymetaforum 2/4/2016 2:44:07 PM(UTC)
Custom MACD Indicator Formula Help (Formula Assistance)
by mosman 1/30/2016 6:42:53 PM(UTC)
MACD formula help (Formula Assistance)
by jit005 9/7/2015 11:30:53 PM(UTC)
explorer formula help (Formula Assistance)
by dimpledbrain 3/30/2015 2:58:06 PM(UTC)
Metastock Commentary Writeif Formula Help (Formula Assistance)
by essemkay 11/23/2014 3:34:34 PM(UTC)
renko formula help (Formula Assistance)
by indexarb 7/29/2012 9:33:15 AM(UTC)
Formula Help (Formula Assistance)
by Golf4 4/23/2012 9:43:33 AM(UTC)
Formula Help please for specific ROC to Highest high (Formula Assistance)
by rjr27 3/21/2012 7:30:45 AM(UTC)
FDI (Fractal Demension Index) or Hurst Exponent formula help (Formula Assistance)
by TomHam 11/12/2010 12:15:43 PM(UTC)
Formula help! Previous day close (Formula Assistance)
by ericlawok 5/6/2010 12:10:49 PM(UTC)
Formula Help:EMA10 with MACD (Formula Assistance)
by asiatrader98 2/19/2009 4:22:21 AM(UTC)
Formula help: Ref() function (Formula Assistance)
by hatem 2/17/2009 4:19:35 AM(UTC)
Formula help (Formula Assistance)
by Icko 2/13/2009 3:48:31 AM(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.