Jump to content
Medved Trader Forums

nasdorq

Members
  • Posts

    86
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by nasdorq

  1. That would work. Perhaps a 1 week option as well?
  2. Open Interest Tree is great. One idea would be to choose the # of days in the future you want to include, and have those automatically displayed. Choosing 30 days would mean as contracts expire and new ones enter that 30 day forward window, they are automatically displayed. I find as different symbol types have different frequencies of expirations (daily, weekly, monthly options), sometimes I have to click the tree and make sure all expirations are included.
  3. Didn't see this asked yet. Is there a way to display an open position line from a symbol on the chart of a different symbol? For example, display open position for @MES (e-micro S&P futures) onto @ES (emini) chart, since they're essentially the same instrument except for contract size. Perhaps one way is using InterVar/SetLine, but I thought I'd check if there's an easier way.
  4. Interesting new feature. A few questions: -does the secondary symbol need to be in a portfolio or another primary chart in order to stream? -does the secondary symbol use the same data source at the primary symbol? or smartsource? -is it possible to use indicator values for the secondary symbol, for example a volume delta?
  5. While SetColor and SetShape allow users to configure those two from within the paintbar code, something like SetSize would allow for new possibilities. For example: -varying the size of a paintbar shape by the strength of a signal -varying SetYValue line thickness depending on chart conditions -creating volume bubbles behind price, based on the amount of volume per bar
  6. Thank you for the reply Don. Under private struct PaintbarState I have: public int AboveHigh; public int Below High; Do you mean edit those so they both have the value -1? Unfortunately I'm over my head with this stuff, so I'm not sure how to initialize something, what it would look like or where to put it.
  7. I managed to cobble something together from looking at other state keeping posts in the forum. It works for the most part, though there's one small error I can't seem to solve. I attached a picture of of it on the NQH23 and QQQ. Red horizontal lines are previous days high. Green background is the current bar crossing above the previous days high. It works on the QQQ. but on NQ, sometimes the paintbar triggers on the opening bar, even though it isn't crossing the previous day high. I've circled them in blue. The 29th it even triggers twice in the same session. If anyone has any suggestions I'd love to hear. Happy new year! code didn't post, so attaching as a screenshot
  8. the goal looking for the current day's high crossing above yesterdays high, is that I could limit the alert to the first time it happens. Otherwise, just looking for anytime price is above yesterdays high, it would trigger repeatedly throughout the session.
  9. Is there a way to get the high of the current day on a bar by bar basis? Then I could have a line where "if todays high (1 bar ago) is less than yesterdays high, and todays high (current bar) is greater than yesterdays high, then triggeralert" Unfortunately the state keeping is a bit over my head. In my example using the horizontal line TodayHigh, I was hoping TodayHigh[1] would work as it's the intraday setting, though it seems to fetch the previous days high. If I can get this working, I can then use it as a template for other paintbars like crossing yesterdays low, red to green, green to red, breaking opening range, etc.
  10. This seems like a simple paintbar, but I'm somehow stuck on this. If todays high crosses above the previous days high, trigger alert. Naturally this could only trigger once per session. I'm using the Horizonal Line indicator for the Vars, such as below. If I try to use the CurrentDailyHigh instead of the TodayHigh var, I get an error message. If anyone has any suggestions I'd be appreciative.
  11. Did you mean this drop down? I noticed these options, though I was hoping to color specific parts of the chart, such as between prices and/or indicator values. For example, coloring the space between the vwap and previous days close. No worries if it's not doable.
  12. I was wondering if it's possible to use paintbars to assign background colors to an area of the chart based on a price level. For example, color the chart background green above the prior days close and red below. Or coloring the space between the previous days close and the vwap. Thank you
  13. When VBP is on the right side of the chart, the bars start to overlap with price. Using padding to drag the bars left creates more space, but it does take up a large portion of the chart. It would handy if there was an option to have VBP in it's own column, similar to the volume bars having their own adjustable space along the bottom.
  14. Thank you Donald. That did the trick. Cheers
  15. Thank you for the suggestions. I managed to get "Bar Volume", "Total Seconds in a bar", and "Current # of seconds into a bar" working as variables. However, when I try to combine them into a Projected Volume calculation, the value in the watchlist Scan Result value is Infinity. I've copied the simple paintbar code below. As you can see in the attached picture, I use the Scan Result in a watchlist to make sure each variable is correct. Since BARVOLUME, SIZE, and SECONDS all work individually, I'm not sure why combining them into straightforward formula would produce infinity. (BARVOLUME / (SECONDS / SIZE)) is the Projected Volume calculation. Is this a potential bug, or have I constructed this incorrectly? //////////////////////////////////////////////////// public void MainCalculation() { var BARVOLUME = BarVolume; // volume of current bar var SIZE = CandleSizeInSec; // number of seconds in a bar var SECONDS = (MTUtil.UtcNowSynced - Timestamp).Ticks/TimeSpan.TicksPerSecond; //seconds into current bar var PROJ = (BARVOLUME/(SECONDS/SIZE)); // projected volume for current bar if ( IsLastCandle) // current bar only { SetColor(Color.Aqua); SetScanResult(PROJ); } }
  16. I'm trying to use Projected Volume in a paintbar. One variation of the calculation would be: BarVolume * (Total seconds in a bar / Current # of seconds into a bar) Are there any pre-programmed keywords or functions for the part in brackets? Or is there a better way to accomplish this? Thank you
  17. The attached image is a watchlist that has "Range" indicator. It displays a bar that indicates where the instrument is in relation to the days range. At the high of the day is full green, low of day is full red, etc. When combined with % change, it's a way to quickly see which symbols are leading/lagging, especially for a large watchlist. Just thought I'd mention in case there was interest.
  18. Thank you. It seems the "show %" option only appears when the Compare Symbol scale is set to "anchor and fit scale". But that works.
  19. I've looked through the online documentation but can't find what I'm looking for. I was hoping to create a chart with 11 sector etfs overlayed, and plotted by % change on the day. The "Compare Symbol" indicators in the attached chart works, however the scaling options revolve around the main chart scale, so any relative strength/weakness is harder to spot. Is there a way for the chart y-axis to be % change instead of price? Or is there a better way to approach this?
  20. "CandleNumber -15" plots 15 bars back, and "CandleNumber +1" plots to the right, as in the code/chart below. "CandleNumber 0" produces an error. Perhaps you mean referencing Candle 0 outside of the "CandleNumber" function, which behaves differently?
  21. Sorry one more quick follow up. Almost there I'm not quite sure how to reference and save particular candles within the code. I figured I'd just set x1 to "-1000". That way it would cover several days on a 1min chart, and all available data on the 60min chart. However, -1000 bars on the 60min goes way beyond the # of bars on the chart, and causes the paintbar to stop working. Is there an easy way to reference the furthest left candle on any chart, so I could use this on multiple timeframes? If not, I can make do and try to find workarounds. Thanks for your help with this.
  22. Thanks Mike. I set the line ID's to simply #s 1 through 4. I tried giving them names but that returned an error, so numbered will work. One last follow up if I may? 1) I seem to remember reading that paintbars, at least a while back, can't plot beyond the current candle into the future. I tried entering "CandleNumber 5" for x2, and got a bunch of errors. However if I put "CandleNumber -(-5)", with the double negative becoming a positive, it does plot to the right of the current candle. It goes infinitely right, regardless of whether it's -(-1) or -(-100). You can see the example with the red line in the attached chart and the code. Do you think having them plot beyond the current candle will cause issues with regards to stability or resource use? I was hoping to have a bunch of these on different charts. 2) To have the x1 value start plotting from the open 3 sessions ago, is there an easy way to reference the CandleNumber for the opening bar 3 sessions ago? (I was hoping to use this on charts with different timeframes, otherwise I could just count the # of bars). I figure I could save it as a var, and then reference it in the SetLine as CandleNumber -(var). __________________________________________ public void MainCalculation() { var TS = GetTradingSessionInfo(Timestamp); if (DateTime.UtcNow>TS.DayStart.AddDays(3)) // only plot last 3 days return; var Line1 = 4460; // prices for horizontal lines var Line2 = 4455; var Line3 = 4450; var Line4 = 4445; var test = 10; Color Orange = (Color.Orange); SetLine(1, Orange, CandleNumber -15, Line1, CandleNumber, Line1, 2, null); Color Red = (Color.Red); SetLine(2, Red, CandleNumber -15, Line2, CandleNumber -(-5), Line2, 2, null); Color Yellow = (Color.Yellow); SetLine(3, Yellow, CandleNumber -15, Line3, CandleNumber, Line3, 2, null); Color Blue = (Color.Blue); SetLine(4, Blue, CandleNumber -15, Line4, CandleNumber, Line4, 2, null); }
  23. public void MainCalculation() { var TS = GetTradingSessionInfo(Timestamp); if (DateTime.UtcNow>TS.DayStart.AddDays(3)) // only plot last 3 days return; var Line1 = 4460; // prices for horizontal lines var Line2 = 4455; var Line3 = 4450; var Line4 = 4445; Color Orange = (Color.Orange); SetLine(TradingDay.DayNumber, Orange, CandleNumber - 15, Line1, CandleNumber, Line1, 2, null); Color Red = (Color.Red); SetLine(TradingDay.DayNumber, Red, CandleNumber - 15, Line2, CandleNumber, Line2, 2, null); Color Yellow = (Color.Yellow); SetLine(TradingDay.DayNumber, Yellow, CandleNumber - 15, Line3, CandleNumber, Line3, 2, null); Color Blue = (Color.Blue); SetLine(TradingDay.DayNumber, Blue, CandleNumber - 15, Line4, CandleNumber, Line4, 2, null);
  24. I'm trying to use SetLine to plot multiple horizontal lines from a single paintbar. The code is below. What I'm struggling with is the SetLine ID and X axis values. ID, I'm not sure what to put, so I copied TradingDay.DayNumber from the support example X1 and X2, I put CandleNumber -15, Candle Number, to at least see if it would plot. The result is, it only plots the 4th (blue) SetLine. Do you have any suggestions for the proper ID and X values, so that all 4 lines plot, and starts from the beginning of 3 sessions ago? ___________________________________________________
  25. I was hoping to overlay an inverse $VIX line on a $SPX chart, so they move in the same direction and are easier to compare. The Symbol Compare has both going in opposite directions, so I made a simple paintbar to plot a negative value of the $VIX, which moves in the right direction. However it's so far off the chart and doesn't have a way to anchor and share the scale. Do know an easy way to accomplish this?
×
×
  • Create New...