Jump to content

Welcome to the new Traders Laboratory! Please bear with us as we finish the migration over the next few days. If you find any issues, want to leave feedback, get in touch with us, or offer suggestions please post to the Support forum here.

Sparrow

Members
  • Content Count

    324
  • Joined

  • Last visited

Posts posted by Sparrow


  1. Here's what I got from Gumphrey, I removed references to a company that sells overpriced and probably junk indicators.

     

        [Description("Squeeze")]
       [Gui.Design.DisplayName("Squeeze")]
       public class Squeeze : Indicator
       {
           #region Variables
    	private double		stddev	= 2;
    	private int			sma		= 20;
    	private bool		darkbkdg = true;
    	private Color		SqueezeColor	= Color.Red;
    	private Color		ActionColor		= Color.LimeGreen;
    
    	private double		BBlow	= 0;
    	private double		BBhigh	= 0;
    	private double		KClow	= 0;
    	private double		KChigh	= 0;
    	private double		Mom		= 0;
    	private double		Mom1	= 0;
    	private double		Macd	= 0;
    
    	private int			barcounter = 0;
    	private double		rangefactor = 1.5;
    	private DataSeries	hlc3;
           #endregion
    
           protected override void Initialize()
           {
    		Add(new Plot(new Pen(Color.Blue, 9), PlotStyle.Bar, "Mom[0]>0: Mom[0]>Mom[1]"));
    		Add(new Plot(new Pen(Color.FromArgb(255,0,0,128), 9), PlotStyle.Bar, "Mom[0]>0: Mom[0]<=Mom[1]"));
    		Add(new Plot(new Pen(Color.FromArgb(255,225,20,20), 9), PlotStyle.Bar, "Mom[0]<=0: Mom[0]<Mom[1]"));
    		Add(new Plot(new Pen(Color.FromArgb(255,128,0,0), 9), PlotStyle.Bar, "Mom[0]<=0: Mom[0]>=Mom[1]"));
    		Add(new Plot(new Pen(Color.Transparent, 1), PlotStyle.Line, "Squeeze"));
    		Add(new Plot(new Pen(Color.Transparent, 1), PlotStyle.Line, "Signal"));
    
    		hlc3 = new DataSeries(this);
               CalculateOnBarClose	= false;
               Overlay				= false;
               PriceTypeSupported	= false;
    		DrawOnPricePanel	= false;
           }
    
           protected override void OnBarUpdate()
           {
    		if(darkbkdg)
    			BackColor = Color.DimGray;
    		hlc3.Set((High[0]+Low[0]+Close[0])/3);
    		if(FirstTickOfBar)
    		{
    			barcounter++;
    		}
    		if(barcounter < sma)
    			return;
    		else
    		{
    			double keltnerbasis = keltnerema(sma);
    			double atr			= ATR(sma)[0];
    			KClow = keltnerbasis - (rangefactor * atr);
    			KChigh = keltnerbasis + (rangefactor * atr);
    		}
    
    		BBhigh = Bollinger(stddev,sma).Upper[0];
    		BBlow = Bollinger(stddev,sma).Lower[0];
    		Mom = EMA(Momentum(12),10)[0];
    		Mom1 = EMA(Momentum(12),10)[1];
    		Macd = MACD(12,26,9).Diff[0];
    
    		if(BBhigh <= KChigh || BBlow >= KClow)
    		{
    			DrawDot(barcounter.ToString(),0,0,SqueezeColor);
    			Signal.Set(1);
    		}
    		if(BBhigh > KChigh || BBlow < KClow)
    		{
    			DrawDot(barcounter.ToString(),0,0,ActionColor);
    			Signal.Set(-1);
    		}
    
    		if(Mom>0)
    		{
    			if(Mom>Mom1)
    				PlotBlue.Set((Mom+Macd)/2);
    			else
    				PlotDarkBlue.Set((Mom+Macd)/2);
    		}
    		else
    		{
    			if(Mom<Mom1)
    				PlotRed.Set((Mom+Macd)/2);
    			else
    				PlotDarkRed.Set((Mom+Macd)/2);
    		}
    		MainPlot.Set((Mom+Macd)/2);
           }
    
    	private double keltnerema(int inputlength)
    	{
    		double ema = 0;
    		if(ema==0)
    			ema = EMA(hlc3,inputlength)[0];
    		return ema;
    	}
    
           #region Properties		
    	[browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
           [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
           public DataSeries PlotBlue
           {
               get { return Values[0]; }
           }
    
    	[browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
           [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
           public DataSeries PlotDarkBlue
           {
               get { return Values[1]; }
           }
    
    	[browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
           [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
           public DataSeries PlotRed
           {
               get { return Values[2]; }
           }
    
    	[browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
           [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
           public DataSeries PlotDarkRed
           {
               get { return Values[3]; }
           }
    
    	[browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
           [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
           public DataSeries MainPlot
           {
               get { return Values[4]; }
           }
    
    	[browsable(false)]	// this line prevents the data series from being displayed in the indicator properties dialog, do not remove
           [XmlIgnore()]		// this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
           public DataSeries Signal
           {
               get { return Values[5]; }
           }
    
    	[Description("Standard Deviation")]
    	[Category("Parameters")]
    	[Gui.Design.DisplayName("# of std. dev.")]
    	public double SD
    	{
    		get { return stddev; }
    		set { stddev = Math.Max(1, value); }
    	}
    
    	[Description("Squeeze Moving Average")]
    	[Category("Parameters")]
    	[Gui.Design.DisplayName("Squeeze MA")]
    	public int SqueezeMA
    	{
    		get { return sma; }
    		set { sma = Math.Max(1, value); }
    	}
    
    	[Description("Use a darker background")]
    	[Category("Plots")]
    	[Gui.Design.DisplayName("Dark Background")]
    	public bool DarkBackground
    	{
    		get { return darkbkdg; }
    		set { darkbkdg = value; }
    	}	
           #endregion
    
       }
    

     

    God I wish I knew why I'm doing this.


  2. Hi,

     

    there's a small error with the new unread posts feature, which is very cool btw.

    It depends on the location my browser is viewing if the search function works or not.

    E.g. from the TL home( http://www.traderslaboratory.com ) it gives me an error, if I am in the

    forums section it doesn't ( http://www.traderslaboratory.com/forums ).

    This is because the link is relative, just need to convert it to absolute then everything should be fine http://www.traderslaboratory.com/forums/search.php?do=getnew

    TL_search_function_error.thumb.PNG.ceb7d69f7cd8f1b2369f3a0d06e7a0f6.PNG


  3. Saw a buy signal. Entered to find out I was looking at the wrong chart as opposed to the order window. The chart trade went well...the executed trade however, lol! :doh:

     

    same thing happened to me today, fortunately I was only looking at the wrong chart after I covered my position at break even.

    I was beating myself up about buying at the high of the retracement when I realized it wasn't the same chart :crap:


  4. If you need extra desktop space it doesn't necessarily mean that you have to buy a new monitor. I'm currently evaluation multiple virtual desktops. Imo there is no big difference if you either turn your head or push a hotkey and switch to another workspace. For multi instrument/divergence trading this might be less than ideal, but there are ways to make this work as well.

     

    ... just a suggestion. The program I linked to is not the only one out there.


  5. Thanks Sparrow,

     

    I demoed Ninja trough them. Not bad, but as mentioned before I have some trouble with NT because it's very system consuming.

     

    In general I got the impression that NT contains some good ideas, but it seems to be a bit beta...

     

    Grüße aus Köln nach Wiesbaden btw ;)

     

    I agree with you about NT, although imo resource consumption isn't that bad, at least if you have your computer dedicated to trading.

     

    It's good enough to satisfy most of my very specific needs: free with data from MB, convenient to program and pretty.

    But it is clearly not as advanced as some of the competitors and isn't rock solid but stability is ok:pc guru:.

     

    QuoteTracker is another interesting platform, it doesn't have the bells and whistles but I've seen people rack up serious profits with it.

     

    Good luck und Grüße zurück nach Köln:ciao:


  6. Hi torero,

     

    I'm not trading the pair just doing my research but I am looking a lot into cross pairs these days.

    Unfortunately not the best spread on them but the moves sure are fantastic.

    JPY crosses I'm looking at: AUD,CAD,CHF,EUR,GBP

    GBP crosses: CHF

    EUR crosses: AUD,CAD

    AUD crosses: CAD

     

    NZDJPY might be tradeable too.


  7. Thanks for your very insightful posts James!

     

    Some simple questions:

    do you pay any attention to the volume profile, MP and VP look very similar most of the time anyway.

    Are VAH and VAL derived from MP or VP, differences should be subtle.

     

    Just asking because I'm thinking of doing my own MP, but not sure if and when that will happen and MP is a lot easier to do than VP.

    The effort would be worth it though.


  8. Rivalries are fun, I'm not certain if the players take them as serious as the fans though.

    The Avs and the Wings met a lot of times in the playoffs and usually the team that is more eager to win and does everything it takes will move on. The Claude Lemieux hit on Draper is one example. The Moore incident wasn't pretty and Bertruzzi deserved what he got, it was a bit of a retaliation for the hit on Naslund earlier but way out of proportion.

     

    Unfortunately I don't know any of the details of what happened over the last years, times is limited and as much as I love hockey, I don't have the time to follow it closely.

    Gotta be focused to achieve something :D.


  9. I haven't had shure in ear headphones, but my etymotics are pretty much the same.

    Once one guy was standing beside me and talked to me while I had music on. It wasn't very loud and until he touched my shoulder I wasn't aware that he was even standing there because I was sitting with my back to the door.

     

    You don't even need to put on music if you don't feel like it.


  10. The Avs are sure holding up well for an injury ridden team. The season is still long and who knows what will happen, as competitive as the northwest is I wouldn't be able to make any predictions. I just hope for some great entertaining hockey.

     

    One thing I keep wondering about is how the Red Wings manage to be first in the western conference almost every year. Is their management/coaching/scouting so much better than all the others? Funny though how placing first gives only a limited advantage on winning the cup.


  11. Hi Eva,

     

    sounds like you're off to a good start :D.

    The reason why I recommend Steenbarger's book is because it is somewhat unique, it doesn't deal with setups itself but the way how to become a successful trader.

    He's got a blog which is very popular and he's also talking about equities there, but just secondarily because stock index futures are his focus.

     

    As for trading live and not paper trading is somewhat debatable. You can learn trading in a simulator much faster, but the emotinally side of trading is only experienced when there's real money on the line. Make your education as inexpensive as possible, but I don't have to tell you that women are much better at this than guys(me for example).

     

    Hope some of it is useful :D

     

    Cheers


  12. Hi there and welcome,

     

    I highly recommend reading Steenbarger's "Enhancing Trader Performance", as a trader you have to find your own niche, style to trade and your way to interpret the markets.

    The book doesn't end there and it won't tell you which one you should pick, that it is up to yourself.

    Unfortunately I can't recommend a school/mentor, since I just poke my nose into anything that comes along and try to get something out of it, a lot of trial and error.

    Thanks to this board I'm making some progress :D.

    Currently I explore very simple things and begin to find some value in it.

     

    Good luck


  13. Hi James,

     

    I've followed the Canucks for more than 10 years, although I became a fan for the most shallow reasons. I love the same things about hockey as you do, a team sport can hardly be more exciting. Unfortunately I don't follow the action a lot less than I did some years ago, mainly because there are tons of other things to do, just watching the highlights on nhl.com, which is about all I can get here. The shootouts are really fun to watch.

     

    With the current standings, things should stay interesting in the northwest division :D.

     

    Good luck to the Avs, hope though that the Canucks will take the division title sorry.


  14. In terms of size, can't be big enough but this is mostly an economical thing if prices are twice as much for 2 inches more, I wouldn't buy it unless I'm swimming in money. If you feel the need to show off though and you can afford it, spend as much as you like and feel good about yourself :D.

     

    The resolution doesn't need to be astronomical, it should fit the size, if you have sharp eyes you can go for higher resolution.

     

    Contrast of course is also the more the better, but I generally have no idea what the figures really imply.

     

    The way I do this is, I decide on a price I am willing to pay then I go to a site that quotes best prices and read all the reviews of the models in question.

    I usually focus on the bad reviews, but don't overdo it, because there is always someone who is unhappy with a product because of their higher standards or they just want something to moan about.

     

    Good luck.


  15. The VWAP has a very long memory because it hasn't got a period, that's why it takes a whole lot to change the width of the SDs after some time.

    Ensign doesn't look so different from the NT version, problem is that if one SD is off the error gets multiplied with each next SD. Small differences can have a huge impact.

     

    Therefore it would be interesting to know if the VWAP has been setup equally in all charts. The only parameter is start time, so nothing much to choose from.

    Just trying eliminate one source of error here.

     

    Cheers

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.