3acor Posted January 16, 2023 Report Share Posted January 16, 2023 How can I have the BarVolume be taken at the time the candle is processed rather than the current one? For Example, if ( ((High-Low[2]) > 0.5) && BarVolume > 10000000) I want the BarVolume to be considered at the time when the (High-Low[2]) > 0.5 Quote Link to comment Share on other sites More sharing options...
3acor Posted January 17, 2023 Author Report Share Posted January 17, 2023 I meant to use it with the Loop function Any but somehow wasn't giving me the results I wanted. It's all good now. Quote Link to comment Share on other sites More sharing options...
3acor Posted January 18, 2023 Author Report Share Posted January 18, 2023 So the issue is that the results are showing in the paintbar, but I am not getting anything in the scan. Is that how it is supposed to be? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted January 18, 2023 Report Share Posted January 18, 2023 I am not sure what the problem is. BarVolume is the volume of the current candle, even if it is not complete. If you show the results in paintbar, it should show in scan as well. The caveat here is that the initial conditions have to be the same between the two. That is, they both should be intraday or historical, both have the same extended hour setting, both have the same frequency. Quote Link to comment Share on other sites More sharing options...
3acor Posted January 18, 2023 Author Report Share Posted January 18, 2023 I have the same frequency and they are both running on 1day historical charts. Here is a picture showing that AADI is not appearing on the scanner. Maybe because the paintbar is not for the current session? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted January 19, 2023 Report Share Posted January 19, 2023 Note that the alerts ONLY appear if they happen on the LAST (current) candle's calculation. Quote Link to comment Share on other sites More sharing options...
3acor Posted January 19, 2023 Author Report Share Posted January 19, 2023 (edited) I don't have alerts. I only have a paintbar that includes High/Low/Open/close and BarVolume. Oh, you mean the scan results? If so, is there no work around it? If I have 3000 symbols, can't I have the scanner in a way show me only the tickers with paintbar on? Edited January 19, 2023 by 3acor Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted January 20, 2023 Report Share Posted January 20, 2023 Yes, scan results only show if the condition is true on the current - last - candle of the chart. Unlike the paintbar that can show if the condition was true on any candle in the chart. That's the whole point of the scanner - you can scan 3000 symbols and show only the tickers for which the condition is NOW true. You can, of course, write the scanner with a condition "if this condition was true in any of the last N candles", too. Quote Link to comment Share on other sites More sharing options...
3acor Posted January 20, 2023 Author Report Share Posted January 20, 2023 yes I previously did that with the ANY function. It shows on the scanner only thing is that the paintbar applies to all the bars afterwards, but it's ok I guess. Quote Link to comment Share on other sites More sharing options...
3acor Posted January 21, 2023 Author Report Share Posted January 21, 2023 (edited) If(Any(0,1000,(BarVolume >=300000000 && ((High-Low)/Low >=0.5))) ) Some tickers are not showing on the scanner. For example, ticker SPI will show a paintbar but will not show on the scanner. Is my code wrong? Edited January 21, 2023 by 3acor Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted January 21, 2023 Report Share Posted January 21, 2023 1. This is EXTREMELY inefficient. It has to loop through the last 1000 candles EVERY time there is a trade in the stock. I am surprised your MT didn't slow down to a crawl. 2. This says: if any of the last 1000 candles had a volume that was greater than 300M and went up more than 50% from low to high in ONE candle... Was there a candle in SPI that fit that criteria? Quote Link to comment Share on other sites More sharing options...
3acor Posted January 21, 2023 Author Report Share Posted January 21, 2023 (edited) 1. Oh I thought the Any function starts counting starting as of the current day, not as of the current candle being processed. So I chose 1000 as of the current today (to go back 5 years). Now I changed it to 0 and got the same results. 2. Yes, SPI had that on September 23, 2020. I have attached a screenshot showing the paintbar working but nothing on the scanner ( I disabled the Filter in Portfolio) Edited January 21, 2023 by 3acor Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted January 21, 2023 Report Share Posted January 21, 2023 Ok I see why this is happening. The historical scanner assumes that you don't need more than 500 candles to work on. Apparently a bad assumption. I removed that. Well, made it bigger - 3000 candles. 3000 trading days back - hopefully that's more than anyone would need. 1 Quote Link to comment Share on other sites More sharing options...
3acor Posted January 21, 2023 Author Report Share Posted January 21, 2023 Thanks a lot. I appreciate it! Is it possible you can send me the update? Quote Link to comment Share on other sites More sharing options...
3acor Posted January 1 Author Report Share Posted January 1 I am running into this problem again. The Any function doesn't show any results in the scanner but the paintbar works Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.