Jump to content
Medved Trader Forums

nasdorq

Members
  • Content Count

    57
  • Joined

  • Last visited

  • Days Won

    2

nasdorq last won the day on December 16 2014

nasdorq had the most liked content!

Community Reputation

3 Neutral

About nasdorq

  • Rank
    Advanced Member

Recent Profile Visitors

700 profile views
  1. I have a question about scaling with multiple paintbars. I've attached a chart to show my issue. The chart symbol is MSFT (red line), along with two paintbars (green and blue lines). They are all squiggly lines, however because the prices are so different, the scaling makes them appear as horizontal. I see with indicators there is an option to adjust the scale, but I don't see it for paintbars. My two questions: 1) If I'm looking to overlay and compare two paintbar lines, is there a way to adjust the scaling and bring them in line? 2) Is there a way to ignore the scale of the chart symbol, and have the chart instead scale just around a paintbar? I tried the option of hiding the primary chart, which makes the price bars disappear, however the chart scale still has to include the primary chart, which again leads to compressed lines if the paintbar has a high value. Thanks
  2. I was getting an "inaccessible due to it's protection level" error, so I put "public" in front of "int Boom;" and it worked. You suggested setting the state variable to 99999, which I'm not sure where to put, but it seems to work anyway. Thanks again. I posted the full code of my original example idea in case it helps anyone. private void PaintbarInitialize() { } private struct PaintbarState { public int OutsideBar; public int InsideBar; } private PaintbarState CurrentState; private PaintbarState SavedState; private void PaintbarClearState() { CurrentState = new PaintbarState(); } private void PaintbarSaveState() { SavedState = CurrentState; } private void PaintbarRestoreState() { CurrentState = SavedState; } public void MainCalculation() { if (High>High[1] && Low < Low[1]) { CurrentState.OutsideBar = 0; } else { CurrentState.OutsideBar++; } if (High<High[1] && Low > Low[1]) { CurrentState.InsideBar = 0; } else { CurrentState.InsideBar++; } if (CurrentState.OutsideBar < CurrentState.InsideBar) { SetColor(Color.Green); } }
  3. Thanks Mike for the tip. I put together most of it, but I'm not quite sure how to declare a state variable called Boom. I googled but didn't find any good examples. What I have is below: public void MainCalculation() { //declare state variable Boom; if (High>High[1] && Low < Low[1]) { CurrentState.Boom = 0; } else { CurrentState.Boom++; } if (CurrentState.Boom > 5) { SetColor(Color.Green); } }
  4. Hey guys, Recently I inquired about the possibility of a "Bars Since True" looping function, where it reports the # of bars since a particular chart event, which I guess would be a timespan data type. In case it wasn't on the todo list, I figured I would ask if there is a way to do it without the simplified looping function? I have snippets from other loops, and in a previous thread the "Ago" was mentioned, but I can't seem to put it together. One use would be to compare the recency of particular chart events, for example: If Bars since "Outside bar (engulfing)" > Bars since "Inside bar" { SetColor(Color.Green); }
  5. The code didn't post initially. I had to copy to a notepad file and then copy/paste as plain text.
  6. i created a cumulative $TICK paintbar if anyone is interested. It uses the Compare Symbol indicator, so the underlying chart doesn't have to be the $TICK itself. I have two calls for SessionInfo, which could maybe reduced to one somehow. Thanks to Jerry and Mike for creating the loop functions. public void MainCalculation() { var TT = GetTradingSessionInfo(Timestamp); TradingSessionInfo session = GetTradingSessionInfo(Timestamp); TimeSpan TS = (Timestamp[0] - session.SessionStart); // number of minutes into session int p = (int) TS.TotalMinutes; // convert Timespan to integer if (DateTime.UtcNow<TT.DayStart.AddDays(1)) // only plot current day { SetColor(Color.Black); SetYValue(Sum(p,TICK)); //plots a running total using the Sum loop function } }
  7. Just wanted to throw the idea out there for the ability to have indicators like moving averages, vwap etc appear behind the price candles, as they can with draw objects. I made the indicator lines thicker so they're easier to read, but sometimes they overlap the tops/bottoms of bars. For equities charts with only RTH, the vwap vertically covers a sizeable portion of the opening candle.
  8. Tiny feature request. The list of shapes in the paintbar indicator has a bunch of symbols and letters. It might be helpful for some if there were some numbers in there, even 0-10. A number could display how many bars back a recent event occured, or maybe as an aid for recommended trade size based on chart volatility, etc.
  9. Thanks for the example above Jerry, for only getting an alert once per bar. If I could post a quick follow up. I tried to implement it but I didn't do it properly. For simplicity, it's an alert when the high > prior bars high. I'm using the method where if the result is false, to end the code using "return", and therefore keep going if it's true. public void MainCalculation() { { if (High <= High[1]) return; } { if (LastTriggeredTimestamp != Timestamp) { SetColor(SysColor.MainIndicator1); TriggerAlert("dalert", @"dmessage"); LastTriggeredTimestamp = Timestamp; } } } The error I get is : The name 'LastTriggeredTimestamp' does not exist in the current context. I get it for Pos 8,13 and 12,13. Do you know what I'm doing wrong? edit: I can't seem to post normally so I had to remove formatting
  10. One idea might be a trigger "once per bar" setting. Currently if a trader wants this, they could set the clearing time to the same # of seconds as the current timeframe. However, it becomes difficult if a trader frequently changes the timeframes on their charts at different times of the day, or if they simply have a lot of charts with varying timeframes. Once per bar means everything is constant, regardless of the chart timeframe.
  11. Just thought I'd throw a couple ideas out there that relate to paintbars. 1) Audio alerts for paintbars 2) Being able to create the same type of alerts we can with paintbars, but instead of only having them for charts, also be able to apply them to a list of symbols. I've seen it elsewhere, where it looks like a grid/spreadsheet. Symbols on the left, Names of Alerts along the top columns. When an alert triggers for a certain symbol, the cell flashes.
  12. Yes. The allocation methods are specified in TWS. Then when you buy/sell in the master account, TWS makes sure the sub accounts have the proper position size based on the allocation method. TWS has the ability to display the total position size for all sub-accounts. If you ever wanted to play around with an advisor demo, I could give you my paper trading account login.
  13. When connecting with an IB advisor, MT recognizes the master account (F account) as well as the sub-accounts (U account). In IB, the master account is used for order execution, and the shares are automatically distributed to the sub accounts. The master doesn't actually contain the positions. When chart trading is enabled in MT, normally a user can see the position size and price on the chart. However, because the master account doesn't hold positions, no positions are shown on the chart. If a sub-account is selected in MT for chart trading, that particular sub-accounts positions are shown. However, that would mean that MT trade orders would be sent to just that sub-account, when all trades are supposed to be executed through the master, to maintain proper allocation size between sub accounts. It might be helpful for anyone with IB advisors who uses MT, to be able to select the master account as the account for placing trades (works now), but also be able to see the positions on the chart as an aggregate of the sub accounts. Perhaps all U accounts that come from a single instance of IB (would have the same socket port #) could be grouped somehow. Not sure if it's doable, or would be of interest. Just thought I'd throw it out there as an idea.
  14. I may be wrong, but I seem to remember with Quotetracker, there was a filter so that for large volume prints, the entire volume bar wouldn't necessarily be shown. The problem with a large volume print, whether it's in a stock or something else, is that it expands the volume scale to fit the entire volume bar, which makes all other volume bars too small to read, until that bar is off the visible part of the chart. It might be helpful to have some kind of filter for this.
  15. I was looking around the ability to set custom chart period/frequency keyboard short cuts. Right now Ctrl + 1 = 1min, CTRL + 2 = 3min, etc. Its not a major feature, but it might be nice for the user to be able to change the period/frequency that these numbers load. Just thought I'd mention.
×
×
  • Create New...