Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Blocks Price count in filter Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
brozeki
Posted : Monday, June 23, 2008 2:32:09 AM
Registered User
Joined: 11/6/2007
Posts: 28
Seems like the price count is always 11 in filter. I'm not sure if this is just me. It seems to be true for all stocks. I did a trivial condition and put a debug log like this 

Me.log.info("Plot count " + price.Count.tostring())


I am using EOD data and did a wipe out on the data earlier and reinstall it back. I am able to draw the condition on the chart though.
brozeki
Posted : Wednesday, June 25, 2008 12:37:09 PM
Registered User
Joined: 11/6/2007
Posts: 28

Worden staff,

comments? This should be easily verifiable.

Kuf
Posted : Wednesday, June 25, 2008 12:41:05 PM


Administration

Joined: 9/18/2004
Posts: 3,522
The reason is that 11 is the default size we try to trim down a calculation to for performing column calculations.

Try this instead:

if price.count < 50 then
return Single.Nan
end if
me.log.info("Plot Count" + Price.Count.tostring())

Ken Gilb (Kuf)
Chief Software Engineer - Worden Brothers Inc.
Try/Catch - My RealCode Blog
brozeki
Posted : Wednesday, June 25, 2008 3:42:27 PM
Registered User
Joined: 11/6/2007
Posts: 28
It gives compile error "return statement in a sub or set cannot return a value"

Anyway, If price count is set to 11 for filter. I would argue that it is semantically wrong. It is like saying "only 11 bars is available."
Users browsing this topic
Guest-1

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.