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

Notification

Icon
Error

Options
Go to last post Go to first unread
vladimir  
#1 Posted : Wednesday, April 6, 2011 2:36:27 AM(UTC)
vladimir

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 7/1/2007(UTC)
Posts: 33

Hi, I need to check whether Moving Average exist on the quarter chart during my exploration. I know how to check for existence of MA using the IsDefined() function. It need 10 quarters of data before MA show on a quarter Chart. So it need roughly 840 days. So I use if(Cum(1) > 840,1,0) in my exploration filter and load the maximum data of 32767 records and still don't get any results. My exploration perioditiy can be monthly or weekly. Please advise why I can't get any result. If other have better way to achiever similar result, please comment & advise. Appreciate the help very much.
wabbit  
#2 Posted : Wednesday, April 6, 2011 2:44:32 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)
Life()


wabbit [:D]

mstt  
#3 Posted : Wednesday, April 6, 2011 4:05:21 AM(UTC)
mstt

Rank: Advanced Member

Groups: Registered, Registered Users, Subscribers
Joined: 7/25/2005(UTC)
Posts: 1,042

Was thanked: 57 time(s) in 54 post(s)
Hi Vladimir A quick way to check how much data your exploration is actually loading is to place "Cum(1)" in a spare column. This will confirm whether or not you're loading as much data as you think you are. What do you mean by "and still don't get any results"? Are you getting N/A, zero, result filtered out or something else? Those of us that might be able to help aren't mind readers and only know what you include in your message. What you know but fail to include is usually the information needed to make intelligent guesses about what the real problem is, so the more you tell us the more likely it is that someone will come up with the correct answer. If yo're running a quarterly periodicity exploration and looking for the result of a 10-period SMA then MS will load attempt to load at least 12-13 quarterly bars (minimum, and more if you set the number of records to load rather than use the Minimum Records setting) and generate an acurate result for every security able to load 10 quarterly bars. Roy
vladimir  
#4 Posted : Wednesday, April 6, 2011 8:10:33 AM(UTC)
vladimir

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 7/1/2007(UTC)
Posts: 33

Thank to both wabbit & Roy advise.

I finally managed to solve the issue myself after
experiencing with trial & error.

The cum() is working fine, it depend on how much data
is loaded in our option configuration.


vladimir  
#5 Posted : Wednesday, April 13, 2011 10:29:44 PM(UTC)
vladimir

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 7/1/2007(UTC)
Posts: 33

Hi After using my filter, found out some ticker symbol still didn't get filter out as expected. Need advise & comment on my code. Here is my logic 1. Exploration Periodicity is set to Quarterly. 2. Data load is max, 32767 3. Exploration date is set to most recent date 4. On my quarter chart timeframe, 2 MA based on high & low 5. Any quarter chart WITHOUT any MA display will be excluded. 6. Not sure why some chart like HBM with 9 quarter candlestick didn't get filtered out. Here is my filter code IsDefined(Mov(H,10,S)) OR IsDefined(Mov(L,10,S)); Thank you
wabbit  
#6 Posted : Thursday, April 14, 2011 1:36: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)
Just put one of the MA conditions in a column and leave out the filter condition. When the exploration runs, if there is insufficient data to compute the MA the symbol will be rejected and you will get an "error" report saying something like "period out of range".

I did this experiment a long tine ago, so may have forgotten some of the details, but when the explorer runs it loads the data for the symbol (as required by the load periods, or it has to evaluate the column and filter conditions for their "minimum records" (and we all know how that can screw things up) ). The explorer then computes the columns in alphabetical order, then finally, the filter. The explorer stops processing that symbol as soon as it encounters its first error condition. So, if you include the Mov() function in a column and there is insufficient data to compute that function, the error will be raised and the filter condition will never be evaluated for that symbol.


wabbit [:D]

vladimir  
#7 Posted : Thursday, April 14, 2011 2:13:52 AM(UTC)
vladimir

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 7/1/2007(UTC)
Posts: 33

Hi Wabbitt Thank for the advise. I have commented out the filter and put MA(H,10,S) in the colA and do a exploration, still manage to get these ticker symbol that pass my exploration. They are MJN, MTT & NUW of the US NYSE. When opened in a chart with peridicity set to Quarter, we don't see any MA there. Howeve, if I try this in the filter, it seem to work Cum(1) > 10 Is that logicall correct ? Plus, I am still wondering why those ticker symbol above having 9 quarter bar get through the exploration. Thank you
wabbit  
#8 Posted : Thursday, April 14, 2011 2:45:49 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)
My exploration:

Code:

{ColA}
mov(H,10,S)

{ColB}
mov(L,10,S)

{ColC}
Cum(1);

filter: none
load: 32767;


on those three stocks, they all pass the exploration as they have exactly 10 bars of quarterly data.

When you open the chart and apply the MA's they don't show up on the chart as a line because the Mov(,10,S) indicator doesn't start drawing until the10th bar (but the value of the MA's is shown in the window titlebar if you create a custom indicator for the MAs).


wabbit [:D]

wabbit attached the following image(s):
MA_Q.png
vladimir  
#9 Posted : Thursday, April 14, 2011 2:54:07 AM(UTC)
vladimir

Rank: Advanced Member

Groups: Registered, Registered Users
Joined: 7/1/2007(UTC)
Posts: 33

Hi Wabbit Thank for the prompt reply and explanation. You have clear my doubts. Thank alot
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.