Jump to content
Medved Trader Forums

Jason

Members
  • Posts

    208
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Jason

  1. When I try this after deleting the name parameter using: SetColorAndShape(PBShape.Fill, Color.Purple ); I get 3 errors: Pos Code Description 29, 9 CS1502 The best overloaded method match for 'MT.Charting.PaintbarBase.SetColorAndShape(string, MT.Charting.PaintbarBase.PBShape, MT.Charting.PaintbarBase.SysColor)' has some invalid arguments 29, 26 CS1503 Argument 1: cannot convert from 'MT.Charting.PaintbarBase.PBShape' to 'string' 29, 40 CS1503 Argument 2: cannot convert from 'System.Drawing.Color' to 'MT.Charting.PaintbarBase.PBShape'
  2. Nice, thank you! The transparency component was throwing me off there. But I am having another problem. When I specify a color in code it does not have an effect. The colors seem to have a life of their own or are locked to whatever colors are selected by default or otherwise in the Parameters box. How can I reset them or make them subordinate to what I've in code? For example, I'm using this: SetColorAndShape("INHAMMER", PBShape.Fill, Color.Purple ); TriggerAlert("test!", @"test."); SetScanResult(@"test"); And the paintbar as drawn is showing up Red.
  3. Why does this work: (Close <= EMA_10+.05 && Close > EMA_10-.05) && (EMA_10 >= VWAP_U) && (Open[3] >= Close) && (High[3] >= High) ) but then this fails: (Close.Crosses(EMA_10) | Close.Crosses(EMA_20)) && (EMA_10 >= VWAP_U) && (Open[3] >= Close) && (High[3] >= High) ) with the error codes: 25, 102 CS0019 Operator '>=' cannot be applied to operands of type 'MT.Charting.PaintbarBase.IndexedPropertyDouble' and 'MT.Charting.PaintbarBase.IndexedPropertyDouble' 25, 124 CS0019 Operator '>=' cannot be applied to operands of type 'double' and 'MT.Charting.PaintbarBase.IndexedPropertyDouble' 25, 146 CS0019 Operator '>=' cannot be applied to operands of type 'double' and 'MT.Charting.PaintbarBase.IndexedPropertyDouble' The EMA, Open[3] and High[3] elements are highlighted but none of that code was changed. Thanks
  4. Trying to determine how I can specify in code the color of the paintbar? I can select the color manually in the Parameters box but I want to be able to control the color from within the code for testing purposes and customization of colors when different conditions are met within the same paintbar. For example, multiple IF conditions each with a separate color... In one of the paintbars I created I can see 0xFF9399FF set within SetColorAndShape but I'm unfamiliar with this number format can't investigate further. Thanks
  5. 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?
  6. 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?
  7. 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
  8. I think that would work just fine. The part about polling it every X seconds and collecting the data for display like an indicator is a little daunting to me though. I thought it would be interesting to see how spread changes over time like during higher points of volatility, near points of support/resistance etc. You could construct an EMA out of it.
  9. Is it possible to retrieve the bid and ask in a paintbar? Such as retrieving them every X seconds and performing calculations with the values?
  10. I would like for the alert line option to always be set whenever I open my layout. What I've found is that even if I set it to use alert line and then save the layout it reverts back to the simple line drawing tool in the QAT the next time I open the layout. Is this normal behavior? If so, is there another option somewhere to make the alert line the default? If so, I haven't been able to find it. Thanks!
  11. Have you been able to confirm there is an issue with this?
  12. Great, thanks! Am I correct then to conclude from this that the function is already requiring the candle body to be at least 3 times the size of the average candle range across the period? I wouldn't have thought it to be so demanding just from seeing it at work in charts.
  13. Here is the code: public void MainCalculation() { if (Close.CrossesUp(PP_R1, 0)) { SetColorAndShape("Crossover", PBShape.Fill, SysColor.Positive); } if (Close.CrossesDown(PP_S1, 0)) { SetColorAndShape("Crossover", PBShape.Fill, SysColor.MainIndicator3); } }
  14. I am trying to create a paintbar that will highlight a candle that crosses over a pivot point level. This is the code I have: My intent is for only the candle that is overlapping the PP level to be identified. What seems to be happening is that once a candle has closed over (or above) the R1 level many (but not all) candles that close above it will also be highlighted. And vice versa after the close of the first candle below the S1. This is happening without much rhyme or reason regardless of whether or not the PP level was ever within the candle's range. I've tried experimenting with CurrentCandle without finding any traction on this.
  15. Not sure if this would be a feature request or if this achievable currently without my awareness but I would like to ask if it's possible to add a criteria to one of the candle stick patterns available in the paintbars. I wish to use the "StrongLine" pattern. Currently I can set the RangeAveragePeriod for the detection and as I understand it the pattern is matched when the candle's range becomes larger than this RangeAveragePeriod. What I would like is to be able to set a threshold for the match such that a match is not returned unless the candle range exceeds a percentage or multiple of that RangeAveragePeriod. For example, only if the candle is 2 times the length of the RangeAveragePeriod or 150% of the RangeAveragePeriod would an alert be issued. This would provide us with a huge degree of flexibility in avoiding false positives.
  16. Would really like to see this functionality added natively as a part of the program at some point in the future. But I think I can achieve this with automation software I'm using for other purposes anyway.
  17. Don't have the time to work with it at the moment but that isn't going to work for me unless I can use that with all of the indicators up, alter the time scale individually for each chart with up to a days worth of chart history and use alerts/display paintbars etc.
  18. I have many, many charts and it would be immensely helpful if I could, for example, allocate these charts to a group, open a watchlist, and then tell MT to open each symbol in the watchlist in a chart in the group. That would open up many possibilities. I could collect a watchlist of stocks I want to watch throughout the day, a watchlist for certain strategies according to criteria I have, separate lists for gappers and non-gap movers... and load them all into the chart group with the click of a button and toggle between them.
  19. Jason

    Finviz

    I would be interested very much in this as well.
  20. Hi, was wondering if there is any way I can un-assign the CTRL+SHIFT hotkey for charts? I have dozens of charts open in my setup and I am using scripting software to to get MT to play well with my brokerage and data feed software and I need the hotkeys CTRL+SHIFT as a part of a lot of the hotkeys I use. Every time I am using CTRL+SHIFT for my purposes I see a flicker/disturbance across my MT charts and aside from being pointless and very annoying I believe it is affecting performance. I found that CTRL-SHIFT is locked for some reason to initiate a "Force a Stop/Limit Order" for some reason in the Charts category.
  21. Jason

    Multithreading?

    Excellent, thanks!
  22. Jason

    Multithreading?

    How heavily multithreaded is MT? Would it help performance having a CPU with many cores?
  23. I figured it out. Copy and paste works most of the time and I use that since I have long complicated passwords but once I entered the password manually I was able to get API access. Sorry for the hassle.
×
×
  • Create New...