Jump to content
Medved Trader Forums

nasdorq

Members
  • Posts

    86
  • Joined

  • Last visited

  • Days Won

    3

Posts posted by nasdorq

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

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

  3. 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?

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

  5. 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!

    image.thumb.png.6d752aee44b55883f11f58dbb0f233fa.png

    image.thumb.png.3b96203e60591d4444e98498bec52516.png

     

    image.png.8c822c45fad7adb3fdf319c8f71c95f6.png

    
    

    code didn't post, so attaching as a screenshot

     

    image.thumb.png.2822b66215cbf4455c66c65f0ee1b9b7.png

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

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

    image.png.19e5dfbacd028b18bf1358417698ef88.png

    If I try to use the CurrentDailyHigh instead of the TodayHigh var, I get an error message.

    image.thumb.png.212b38bc0e27d0243714b27448b4018b.png

    If anyone has any suggestions I'd be appreciative.

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

    image.png.8af20bc77d9104b1419b810c40b20025.png

    image.png.c78b2cabf454f86ca91f38dc572b3687.png

  9. 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);
                     }
    }

    MT.png

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

     

    image.png.8f0224acab6e7d55e28697445f14e241.png

  11. 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?

     

    MT.png

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

     

  13. 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);
        
    }

    MT3.PNG

  14. 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);

  15. 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?

    ___________________________________________________

     

    MT2.PNG

  16. 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?

    VIX.PNG

×
×
  • Create New...