Jason Posted July 19, 2019 Report Share Posted July 19, 2019 (edited) I understand that we can do something like this: Okay can't post code here but I understand how to SetColorAndShape But how do we set PBPlacement at Band on Bottom in conjunction with this? I've played around with it but can't seem to ferret out the correct syntax/usage. Thank you Edited July 19, 2019 by Jason Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted July 19, 2019 Report Share Posted July 19, 2019 The PB's SetColorAndShape sets, unsurprisingly, the color and shape at the particular candle. Where to place that color and shape is not decided at the code level (unless you do SetYValue). At the time you place the paintbar on the chart, in its parameters, you specify where you want that paintbar to appear. Quote Link to comment Share on other sites More sharing options...
Jason Posted July 19, 2019 Author Report Share Posted July 19, 2019 (edited) Although it makes some sense, I was kind of afraid of that. I'm trying to combine multiple paint bars into a single scanner so that multiple PBs can be used simultaneously to scan a watchlist and I don't seem to have access to all of the parameters for each. Is there any workaround for setting the options uniquely for each paintbar? Edited July 19, 2019 by Jason Quote Link to comment Share on other sites More sharing options...
Jason Posted July 19, 2019 Author Report Share Posted July 19, 2019 Actually just occurred to me that I can set the paintbars on the charts separately and not use any visual indicator for the scanner itself. Sorry, getting the concept of scanning mixed up with what's visible on the chart. Wouldn't doing setting up a scanner like that while having the same paintbars set up on many charts add quite a performance penalty? Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted July 19, 2019 Report Share Posted July 19, 2019 Scanning is pretty efficient. Past the initial setting up of the scan, as the data comes in, the scan calculation is done only for the last candle. The "problem" with scans is that each symbol has to, initially, recalculate a bit of candle data for itself (how much candle data depends on the indicators in the scan) and keep those candles and the indicator values around while it is running, thus using up some memory. But I know some MT users are running 1500 symbol RT scans with some quite complex code in them and MT seems to handle it ok. Modern computers are pretty amazing in terms of performance. I started programming in the 70s. Computers changed quite a bit during the last 40 years or so. And yes, same code can be used for scans and paintbars. We deliberately made it that way. Quote Link to comment Share on other sites More sharing options...
Mike Medved Posted July 19, 2019 Report Share Posted July 19, 2019 Also - in order to scan using several paintbars, you have to combine the several paintbars' code into one scan, and set the scan results or scan result colors differently for the different code's triggers. Only one scan can run on a portfolio at a time. Quote Link to comment Share on other sites More sharing options...
Jason Posted July 19, 2019 Author Report Share Posted July 19, 2019 Great to hear, thanks! 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.