Jump to content
Medved Trader Forums

Scan questions


Recommended Posts

Thanks.

Another Scan question. I have created a scan on a portfolio that shows when a stock is below VWAP and I have created a different scan that shows when a stock is below the 20EMA. I can activate either one on my portfolio however I can't figure out how to have 2 conditions in one scan that are "AND" i.e. below VWAP and below 20EMA.

Link to comment
Share on other sites

if using "Simple" mode, you do one condition and if true, do nothing. if false, exit. Then in 2nd condition, you just trigger if true.  It will only get to the 2nd condition if first one is true.

If you convert to Advanced, well then you have full C# syntax capabilities, so you can do stuff like 

if (aaa condition and BBB condition)
.....

 

Link to comment
Share on other sites

no, the indicators do not know about the frequency of the chart.  The period of the indicator is # of candles so whatever the chart is set to, that is what it will refer to.  So EMA 20 on a 1 minute chart will be for 20 minutes where as on a 5 min chart, it would cover 100 minutes.    if you want to reference EMA 20 as it would be on a 5 minute chart, but on a 1 minute chart, you can just refer to EMA100

Link to comment
Share on other sites

That makes sense but still a bit confused.

I am running the scan on a portfolio window set to Freq of 1 minute. (I assume this is like having a 1 minute chart open. Please confirm)

I want a scan which is positive if BOTH of these conditions are met:

1. Below lower Keltner Channel on a 5 minute basis (chart).

2. Stochastic Momentum indicator below -50 (minus 50) on a 1 minute basis (chart).

Link to comment
Share on other sites

Yes, that means it's running on 1-min candles, just like having a 1-minute chart and putting that paintbar on it.

As for your question. No, the scan's indicator parameter is not # of minutes, but # of candles...

You can twiddle this a bit. You can have two scans, running on two portfolios (with the same symbols in both portfolios). One scan you would run on 5-min candles, get the KC indicator and store the value in the SetInterVar function. This first scan would not trigger any scan result. In the other scan, you would use GetInterVar to receive that value, and use it as the KC value.

 

Link to comment
Share on other sites

since scans basically operate on the last candle, yes, those two are the same, unless of course you had some calculations that accumulate data or one candle result impacts the next candle. But if you were to use the same scan in a paintbar, it would definitely be different.  SymbolData.* is the "current" value of whatever field, regardless of which candle is currently being computed for the scan/paintbar.

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

Join the conversation

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

Guest
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...