BuyAtLimit (High) - Moving Average is trending up (Moving Average group) - Price decreases a consecutive number of bars (Price (or Volume) group)
// IS: BuyAtLimit(bar + 1, High[bar], "");// CHANGE TO: BuyAtStop(bar + 1, High[bar] + 0.10, "");
DataSeries s = Lowest.Series(Close, period) >> 1
holder.rsi = RSI.Series(Bars.Close, Period)[bar];
// IS: list.Sort(this); // CHANGE TO: list.Sort(this); list.Reverse();
Required RAM = Number of stocks * number of bars * number of data series (typically 6: DateTime + OHLCV) * 8 bytes
for(int bar = 20; bar < Bars.Count-1; bar++)
Close[bar].ToString("0.00")
protected override void Execute() { DateTime dt = new DateTime(2008,01,23); for(int bar = 20; bar < Bars.Count; bar++) { //Date[bar] = dt; Open[bar] = SMA.Series( Open, 20 )[bar]; High[bar] = SMA.Series( High, 20 )[bar]; Low[bar] = SMA.Series( Low, 20 )[bar]; Close[bar] = SMA.Series( Close, 20 )[bar]; } }
protected override void Execute() { HideVolume(); ChartPane GiantPane = CreatePane(Int32.MaxValue,false,false); PlotSeries( GiantPane, RSI.Series( Close,14 ), Color.Blue, LineStyle.Solid, 2 ); }
protected override void Execute() { for(int bar = 20; bar < Bars.Count; bar++) { /* In MetaStock: a11:= (a10+PREV*(a5-1))/a5; */ a11 = ( a10+a11*( a5-1 ) )/ a5; } }
protected override void Execute() { int bar = Bars.Count-1; var pane = CreatePane(30,true,true); string UpArrowGreen = Convert.ToChar(0xe9).ToString(); string UpTriangleGreen = Convert.ToChar('\u25b2').ToString(); AnnotateBar( UpArrowGreen, bar, true, Color.Green, Color.Transparent, new Font( "Wingdings", 10, FontStyle.Bold ) ); AnnotateBar( UpTriangleGreen, bar-1, true, Color.Green, Color.Transparent, new Font( "Times New Roman", 10, FontStyle.Bold ) ); AnnotateChart( pane, UpArrowGreen, bar, 10, Color.Green, Color.Transparent, new Font( "Wingdings", 10, FontStyle.Bold ) ); AnnotateChart( pane, UpTriangleGreen, bar-1, 100, Color.Green, Color.Transparent, new Font( "Wingdings", 10, FontStyle.Bold ) ); }
double d = 123 / 456;
double d1 = 123 / 456d; double d2 = 123 / (double)456; double d3 = 123 / 456.0; PrintDebug(d1 , d2 , d3 );