Jump to content
Medved Trader Forums

Maximum Value

Recommended Posts


I'm writing a scan that includes the current volume being the biggest of the last 5 (incl the current).

I know I can use 

but it's cumbersome. Is there a better way. 

I tried BarVolume = Max(0, 4, BarVolume) but that has given me errors.

Any ideas please.



Link to comment
Share on other sites

OK, managed to sort it out, many thanks.

A few other questions please:

1. Is there a command for the bar's range (High - Low), or would I have to make a variable for that too.

2. Is it possible to round DOWN a number. So 5.3074 to 2 decimal places is 5.30 not 5.31.

3. In my scan results can I have a column for yesterday's high, I only see yesterday's close or volume in column chooser.


Many thanks


Link to comment
Share on other sites

1. There is no variable but doing High-Low works doesn't it?

2. Well. In your case, do Math.Floor(Num*100)/100

3. There is no data to get yesterday's high from in the L1 feed. That can be figured out from the historical intraday data, and used in the scan by selecting a Horizontal Line indicator and setting it to Previous High.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...