Advertisement
Guest User

Untitled

a guest
Oct 8th, 2020
212
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 20.10 KB | None | 0 0
  1. #region Using declarations
  2. using System;
  3. using System.Collections.Generic;
  4. using System.ComponentModel;
  5. using System.ComponentModel.DataAnnotations;
  6. using System.Linq;
  7. using System.Text;
  8. using System.Threading.Tasks;
  9. using System.Windows;
  10. using System.Windows.Input;
  11. using System.Windows.Media;
  12. using System.Xml.Serialization;
  13. using NinjaTrader.Cbi;
  14. using NinjaTrader.Gui;
  15. using NinjaTrader.Gui.Chart;
  16. using NinjaTrader.Gui.SuperDom;
  17. using NinjaTrader.Gui.Tools;
  18. using NinjaTrader.Data;
  19. using NinjaTrader.NinjaScript;
  20. using NinjaTrader.Core.FloatingPoint;
  21. using NinjaTrader.NinjaScript.DrawingTools;
  22. #endregion
  23.  
  24. namespace NinjaTrader.NinjaScript.Indicators
  25. {
  26.     public class TimeZoneColors : Indicator
  27.     {
  28.         private int CZn1St = 0, CZn2St = 0, CZn3St = 0;
  29.         private int CZn1En = 0, CZn2En = 0, CZn3En = 0;
  30.         private string currentZone = "";
  31.         private int lastScreenBar = 0;
  32.  
  33.         protected override void OnStateChange()
  34.         {
  35.             if (State == State.SetDefaults)
  36.             {
  37.                 Description                                             = @"Color the chart background for up to three custom time frames.";
  38.                 Name                                                    = "TimeZoneColors";
  39.                 Calculate                                               = Calculate.OnBarClose;
  40.                 IsOverlay                                               = true;
  41.                 DisplayInDataBox                                        = true;
  42.                 DrawOnPricePanel                                        = true;
  43.                 DrawHorizontalGridLines                                 = true;
  44.                 DrawVerticalGridLines                                   = true;
  45.                 PaintPriceMarkers                                       = true;
  46.                 ScaleJustification                                      = NinjaTrader.Gui.Chart.ScaleJustification.Right;
  47.                 IsSuspendedWhileInactive                                = true;
  48.                 Zn1HrSt                                                 = 19;
  49.                 Zn1MinSt                                                = 0;
  50.                 Zn1HrEn                                                 = 4;
  51.                 Zn1MinEn                                                = 0;
  52.                 Region1Name                                             = @"Tokyo";
  53.                 Region1Brush                                            = Brushes.Pink;
  54.                 Zn2HrSt                                                 = 3;
  55.                 Zn2MinSt                                                = 0;
  56.                 Zn2HrEn                                                 = 12;
  57.                 Zn2MinEn                                                = 0;
  58.                 Region2Name                                             = @"London";
  59.                 Region2Brush                                            = Brushes.Beige;
  60.                 Zn3HrSt                                                 = 8;
  61.                 Zn3MinSt                                                = 0;
  62.                 Zn3HrEn                                                 = 16;
  63.                 Zn3MinEn                                                = 0;
  64.                 Region3Name                                             = @"New York";
  65.                 Region3Brush                                            = Brushes.LightGreen;
  66.                 ColorAll                                                = false;
  67.                 AlertBool                                               = true;
  68.                 Font                                                    = new SimpleFont("Arial", 16);
  69.  
  70.             }
  71.             else if (State == State.Historical)
  72.             {
  73.                 CZn1St = ((Zn1HrSt * 10000) + (Zn1MinSt * 100));
  74.                 CZn1En = ((Zn1HrEn * 10000) + (Zn1MinEn * 100));
  75.  
  76.                 CZn2St = ((Zn2HrSt * 10000) + (Zn2MinSt * 100));
  77.                 CZn2En = ((Zn2HrEn * 10000) + (Zn2MinEn * 100));
  78.  
  79.                 CZn3St = ((Zn3HrSt * 10000) + (Zn3MinSt * 100));
  80.                 CZn3En = ((Zn3HrEn * 10000) + (Zn3MinEn * 100));
  81.             }
  82.         }
  83.        
  84.         protected override void OnBarUpdate()
  85.         {
  86.             int a = 0, r = 0, g = 0, b = 0;
  87.  
  88.             string zone = GetTimeZone(0);
  89.  
  90.             SolidColorBrush br = ChartControl.Properties.ChartBackground as SolidColorBrush;
  91.             SolidColorBrush region1Brush = Region1Brush as SolidColorBrush;
  92.             SolidColorBrush region2Brush = Region2Brush as SolidColorBrush;
  93.             SolidColorBrush region3Brush = Region3Brush as SolidColorBrush;
  94.  
  95.             if (zone.CompareTo("") == 0) { r = br.Color.R; g = br.Color.G; b = br.Color.B; }
  96.             else
  97.             {
  98.                 if (zone.Contains("Z3")) { r = region3Brush.Color.R; g = region3Brush.Color.G; b = region3Brush.Color.B; }
  99.                 if (zone.Contains("Z2")) { r = region2Brush.Color.R; g = region2Brush.Color.G; b = region2Brush.Color.B; }
  100.                 if (zone.Contains("Z1")) { r = region1Brush.Color.R; g = region1Brush.Color.G; b = region1Brush.Color.B; }
  101.  
  102.                 //### Blend colors of overlapped timezones
  103.                 if (zone.Contains("+1"))
  104.                 {
  105.                     r = (int)(Math.Abs((r - region1Brush.Color.R) * .35) + Math.Min(r, region1Brush.Color.R));
  106.                     g = (int)(Math.Abs((g - region1Brush.Color.G) * .35) + Math.Min(g, region1Brush.Color.G));
  107.                     b = (int)(Math.Abs((b - region1Brush.Color.B) * .35) + Math.Min(b, region1Brush.Color.B));
  108.                 }
  109.                 if (zone.Contains("+2"))
  110.                 {
  111.                     r = (int)(Math.Abs((r - region2Brush.Color.R) * .35) + Math.Min(r, region2Brush.Color.R));
  112.                     g = (int)(Math.Abs((g - region2Brush.Color.G) * .35) + Math.Min(g, region2Brush.Color.G));
  113.                     b = (int)(Math.Abs((b - region2Brush.Color.B) * .35) + Math.Min(b, region2Brush.Color.B));
  114.                 }
  115.                 if (zone.Contains("+3"))
  116.                 {
  117.                     r = (int)(Math.Abs((r - region3Brush.Color.R) * .35) + Math.Min(r, region3Brush.Color.R));
  118.                     g = (int)(Math.Abs((g - region3Brush.Color.G) * .35) + Math.Min(g, region3Brush.Color.G));
  119.                     b = (int)(Math.Abs((b - region3Brush.Color.B) * .35) + Math.Min(b, region3Brush.Color.B));
  120.                 }
  121.             }
  122.  
  123.  
  124.             if (r > 255 || r < 0) r = 255; if (g > 255 || g < 0) g = 255; if (b > 255 || b < 0) b = 255;    //### Limit check
  125.  
  126.             BackBrush = FromArgb(255, (byte)r, (byte)g, (byte)b);
  127.  
  128.             if (ColorAll == true)
  129.                 BackBrushAll = FromArgb(255, (byte)r, (byte)g, (byte)b);
  130.             else
  131.                 BackBrush = FromArgb(255, (byte)r, (byte)g, (byte)b);
  132.  
  133.             if (AlertBool == true)
  134.                 if (ToTime(Time[0]) == CZn1St)
  135.                     Alert("r1st", Priority.Medium, "Beginning of Time Region #1", "Alert2.wav", 0, Region1Brush, Brushes.Black);
  136.  
  137.                 else if (ToTime(Time[0]) == CZn1En)
  138.                     Alert("r1en", Priority.Medium, "End of Time Region #1", "Alert2.wav", 0, Region1Brush, Brushes.Black);
  139.  
  140.                 else if (ToTime(Time[0]) == CZn2St)
  141.                     Alert("r2st", Priority.Medium, "Beginning of Time Region #2", "Alert2.wav", 0, Region2Brush, Brushes.Black);
  142.  
  143.                 else if (ToTime(Time[0]) == CZn2En)
  144.                     Alert("r2en", Priority.Medium, "End of Time Region #2", "Alert2.wav", 0, Region2Brush, Brushes.Black);
  145.  
  146.                 else if (ToTime(Time[0]) == CZn3St)
  147.                     Alert("r3st", Priority.Medium, "Beginning of Time Region #3", "Alert2.wav", 0, Region3Brush, Brushes.Black);
  148.  
  149.                 else if (ToTime(Time[0]) == CZn3En)
  150.                     Alert("r3en", Priority.Medium, "End of Time Region #3", "Alert2.wav", 0, Region3Brush, Brushes.Black);
  151.         }
  152.  
  153.         #region Misc
  154.        
  155.         private Brush FromArgb(byte a, byte r, byte g, byte b)
  156.         {
  157.             return (Brush)new BrushConverter().ConvertFrom("#" + a.ToString("X2") + r.ToString("X2") + g.ToString("X2") + b.ToString("X2"));
  158.         }
  159.  
  160.         string GetTimeZone(int x, bool onRender = false)
  161.         {
  162.             int zone = 0;
  163.             string zones = "";
  164.             if (x < 0) x = 0;
  165.  
  166.             //### Check for Zone 1
  167.             zone = 0;
  168.             if (CZn1En < CZn1St)
  169.             { //### Does the time zone end in the next day?
  170.                 if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) > CZn1St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) > CZn1En) zone = 1;
  171.                 if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn1St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn1En) zone = 1;
  172.             }
  173.             else if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) >= CZn1St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn1En) zone = 1;
  174.             //## Overlapped zones?
  175.             if (zone > 0) zones = (zones.CompareTo("") == 0) ? "Z" + zone + zones : "+" + zone + zones;
  176.  
  177.  
  178.             //### Check for Zone 2
  179.             zone = 0;
  180.             if (CZn2En < CZn2St)
  181.             {  //### Does the time zone end in the next day?
  182.                 if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) > CZn2St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) > CZn2En) zone = 2;
  183.                 if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn2St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn2En) zone = 2;
  184.             }
  185.             else if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) >= CZn2St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn2En) zone = 2;
  186.             //## Overlapped zones?
  187.             if (zone > 0) zones = (zones.CompareTo("") == 0) ? "Z" + zone + zones : "+" + zone + zones;
  188.  
  189.             //### Check for Zone 3
  190.             zone = 0;
  191.             if (CZn3En < CZn3St)
  192.             { //### Does the time zone end in the next day?
  193.                 if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) > CZn3St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) > CZn3En) zone = 3;
  194.                 if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn3St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn3En) zone = 3;
  195.             }
  196.             else if (ToTime(onRender ? Time.GetValueAt(x) : Time[x]) >= CZn3St && ToTime(onRender ? Time.GetValueAt(x) : Time[x]) < CZn3En) zone = 3;
  197.             //## Overlapped zones?
  198.             if (zone > 0) zones = (zones.CompareTo("") == 0) ? "Z" + zone + zones : "+" + zone + zones;
  199.  
  200.             return zones;
  201.         }
  202.        
  203.         private Brush getContrastColor(Brush baseColor)
  204.         {
  205.             SolidColorBrush br = baseColor as SolidColorBrush;
  206.             int r = br.Color.R > 127 ? 0 : 255;
  207.             int g = br.Color.G > 127 ? 0 : 255;
  208.             int b = br.Color.B > 127 ? 0 : 255;
  209.             string hex = r.ToString("X2") + g.ToString("X2") + b.ToString("X2");
  210.             return FromArgb((byte) 255, (byte) r, (byte) g, (byte) b);
  211.         }
  212.        
  213.         protected override void OnRender(ChartControl chartControl, ChartScale chartScale)
  214.         {
  215.             base.OnRender(chartControl, chartScale);
  216.             if (ChartBars == null) return;
  217.             string zone = "";
  218.            
  219.             if (GetTimeZone(ChartBars.ToIndex, true).Contains("1")) zone += Region1Name + "\n";
  220.             if (GetTimeZone(ChartBars.ToIndex, true).Contains("2")) zone += Region2Name + "\n";
  221.             if (GetTimeZone(ChartBars.ToIndex, true).Contains("3")) zone += Region3Name + "\n";
  222.             if (zone.CompareTo(currentZone) != 0) currentZone = zone;
  223.             if (BackBrushes.Get(ChartBars.ToIndex - 1) == null) return;
  224.             Brush backColor = getContrastColor(BackBrushes.Get(ChartBars.ToIndex-1));
  225.             Brush foreColor = getContrastColor(backColor);
  226.             Draw.TextFixed(this, "Zone", currentZone, TextPosition.TopRight, backColor, Font, foreColor, foreColor, 50);
  227.         }
  228.  
  229.         #endregion
  230.  
  231.         #region Properties
  232.         [NinjaScriptProperty]
  233.         [Range(0, int.MaxValue)]
  234.         [Display(Name = "Zn1HrSt", Description = "Hour for 1st time region to begin, 24 hour clock.", Order = 1, GroupName = "1st Time Region")]
  235.         public int Zn1HrSt
  236.         { get; set; }
  237.  
  238.         [NinjaScriptProperty]
  239.         [Range(0, int.MaxValue)]
  240.         [Display(Name = "Zn1MinSt", Description = "Minute for 1st time region to begin", Order = 2, GroupName = "1st Time Region")]
  241.         public int Zn1MinSt
  242.         { get; set; }
  243.  
  244.         [NinjaScriptProperty]
  245.         [Range(0, int.MaxValue)]
  246.         [Display(Name = "Zn1HrEn", Description = "Hour for 1st time region to end, 24 hour clock.", Order = 3, GroupName = "1st Time Region")]
  247.         public int Zn1HrEn
  248.         { get; set; }
  249.  
  250.         [NinjaScriptProperty]
  251.         [Range(0, int.MaxValue)]
  252.         [Display(Name = "Zn1MinEn", Description = "Minute for 1st time region to end", Order = 4, GroupName = "1st Time Region")]
  253.         public int Zn1MinEn
  254.         { get; set; }
  255.  
  256.         [NinjaScriptProperty]
  257.         [Range(0, int.MaxValue)]
  258.         [Display(Name = "Zn2HrSt", Description = "Hour for 2nd time region to begin, 24 hour clock.", Order = 1, GroupName = "2nd Time Region")]
  259.         public int Zn2HrSt
  260.         { get; set; }
  261.  
  262.         [NinjaScriptProperty]
  263.         [Range(0, int.MaxValue)]
  264.         [Display(Name = "Zn2MinSt", Description = "Minute for 2nd time region to begin", Order = 2, GroupName = "2nd Time Region")]
  265.         public int Zn2MinSt
  266.         { get; set; }
  267.  
  268.         [NinjaScriptProperty]
  269.         [Range(0, int.MaxValue)]
  270.         [Display(Name = "Zn2HrEn", Description = "Hour for 2nd time region to end, 24 hour clock.", Order = 3, GroupName = "2nd Time Region")]
  271.         public int Zn2HrEn
  272.         { get; set; }
  273.  
  274.         [NinjaScriptProperty]
  275.         [Range(0, int.MaxValue)]
  276.         [Display(Name = "Zn2MinEn", Description = "Minute for 2nd time region to end", Order = 4, GroupName = "2nd Time Region")]
  277.         public int Zn2MinEn
  278.         { get; set; }
  279.  
  280.         [NinjaScriptProperty]
  281.         [Range(0, int.MaxValue)]
  282.         [Display(Name = "Zn3HrSt", Description = "Hour for 3rd time region to begin, 24 hour clock.", Order = 1, GroupName = "3rd Time Region")]
  283.         public int Zn3HrSt
  284.         { get; set; }
  285.  
  286.         [NinjaScriptProperty]
  287.         [Range(0, int.MaxValue)]
  288.         [Display(Name = "Zn3MinSt", Description = "Minute for 3rd time region to begin", Order = 2, GroupName = "3rd Time Region")]
  289.         public int Zn3MinSt
  290.         { get; set; }
  291.  
  292.         [NinjaScriptProperty]
  293.         [Range(0, int.MaxValue)]
  294.         [Display(Name = "Zn3HrEn", Description = "Hour for 3rd time region to end, 24 hour clock.", Order = 3, GroupName = "3rd Time Region")]
  295.         public int Zn3HrEn
  296.         { get; set; }
  297.  
  298.         [NinjaScriptProperty]
  299.         [Range(0, int.MaxValue)]
  300.         [Display(Name = "Zn3MinEn", Description = "Minute for 3rd time region to end", Order = 4, GroupName = "3rd Time Region")]
  301.         public int Zn3MinEn
  302.         { get; set; }
  303.  
  304.  
  305.         [NinjaScriptProperty]
  306.         [Display(Name = "Color All Regions?", Description = "Colors across all panels or just main price display panel", Order = 1, GroupName = "Configuration")]
  307.         public bool ColorAll
  308.         { get; set; }
  309.  
  310.         [NinjaScriptProperty]
  311.         [Display(Name = "Alert on Begin/End?", Description = "Sound and display an alert with Alerts window open ", Order = 2, GroupName = "Configuration")]
  312.         public bool AlertBool
  313.         { get; set; }
  314.  
  315.         [Display(Name = "Text Font", GroupName = "Configuration", Order = 3)]
  316.         public Gui.Tools.SimpleFont Font
  317.         { get; set; }
  318.  
  319.         [XmlIgnore()]
  320.         [Display(Name = "Region 1 Brush", GroupName = "1st Time Region", Order = 5)]
  321.         public Brush Region1Brush
  322.         { get; set; }
  323.  
  324.         [Browsable(false)]
  325.         public string BorderBrushSerialize
  326.         {
  327.             get { return Serialize.BrushToString(Region1Brush); }
  328.             set { Region1Brush = Serialize.StringToBrush(value); }
  329.         }
  330.  
  331.         [XmlIgnore()]
  332.         [Display(Name = "Region 2 Color", GroupName = "2nd Time Region", Order = 5)]
  333.         public Brush Region2Brush
  334.         { get; set; }
  335.  
  336.         [Browsable(false)]
  337.         public string Region2BrushSerialize
  338.         {
  339.             get { return Serialize.BrushToString(Region2Brush); }
  340.             set { Region2Brush = Serialize.StringToBrush(value); }
  341.         }
  342.  
  343.         [XmlIgnore()]
  344.         [Display(Name = "Region 3 Brush", GroupName = "3rd Time Region", Order = 5)]
  345.         public Brush Region3Brush
  346.         { get; set; }
  347.  
  348.  
  349.         [Browsable(false)]
  350.         public string Region3BrushSerialize
  351.         {
  352.             get { return Serialize.BrushToString(Region3Brush); }
  353.             set { Region3Brush = Serialize.StringToBrush(value); }
  354.         }
  355.  
  356.  
  357.  
  358.         [NinjaScriptProperty]
  359.         [Display(Name = "Region1Name", Description = "Name of 1st time region", Order = 6, GroupName = "1st Time Region")]
  360.         public string Region1Name
  361.         { get; set; }
  362.  
  363.         [NinjaScriptProperty]
  364.         [Display(Name = "Region2Name", Description = "Name of 2nd time region", Order = 6, GroupName = "2nd Time Region")]
  365.         public string Region2Name
  366.         { get; set; }
  367.  
  368.         [NinjaScriptProperty]
  369.         [Display(Name = "Region3Name", Description = "Name of 3rd time region", Order = 6, GroupName = "3rd Time Region")]
  370.         public string Region3Name
  371.         { get; set; }
  372.         #endregion
  373.  
  374.     }
  375. }
  376.  
  377. #region NinjaScript generated code. Neither change nor remove.
  378.  
  379. namespace NinjaTrader.NinjaScript.Indicators
  380. {
  381.     public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
  382.     {
  383.         private TimeZoneColors[] cacheTimeZoneColors;
  384.         public TimeZoneColors TimeZoneColors(int zn1HrSt, int zn1MinSt, int zn1HrEn, int zn1MinEn, int zn2HrSt, int zn2MinSt, int zn2HrEn, int zn2MinEn, int zn3HrSt, int zn3MinSt, int zn3HrEn, int zn3MinEn, bool colorAll, bool alertBool, string region1Name, string region2Name, string region3Name)
  385.         {
  386.             return TimeZoneColors(Input, zn1HrSt, zn1MinSt, zn1HrEn, zn1MinEn, zn2HrSt, zn2MinSt, zn2HrEn, zn2MinEn, zn3HrSt, zn3MinSt, zn3HrEn, zn3MinEn, colorAll, alertBool, region1Name, region2Name, region3Name);
  387.         }
  388.  
  389.         public TimeZoneColors TimeZoneColors(ISeries<double> input, int zn1HrSt, int zn1MinSt, int zn1HrEn, int zn1MinEn, int zn2HrSt, int zn2MinSt, int zn2HrEn, int zn2MinEn, int zn3HrSt, int zn3MinSt, int zn3HrEn, int zn3MinEn, bool colorAll, bool alertBool, string region1Name, string region2Name, string region3Name)
  390.         {
  391.             if (cacheTimeZoneColors != null)
  392.                 for (int idx = 0; idx < cacheTimeZoneColors.Length; idx++)
  393.                     if (cacheTimeZoneColors[idx] != null && cacheTimeZoneColors[idx].Zn1HrSt == zn1HrSt && cacheTimeZoneColors[idx].Zn1MinSt == zn1MinSt && cacheTimeZoneColors[idx].Zn1HrEn == zn1HrEn && cacheTimeZoneColors[idx].Zn1MinEn == zn1MinEn && cacheTimeZoneColors[idx].Zn2HrSt == zn2HrSt && cacheTimeZoneColors[idx].Zn2MinSt == zn2MinSt && cacheTimeZoneColors[idx].Zn2HrEn == zn2HrEn && cacheTimeZoneColors[idx].Zn2MinEn == zn2MinEn && cacheTimeZoneColors[idx].Zn3HrSt == zn3HrSt && cacheTimeZoneColors[idx].Zn3MinSt == zn3MinSt && cacheTimeZoneColors[idx].Zn3HrEn == zn3HrEn && cacheTimeZoneColors[idx].Zn3MinEn == zn3MinEn && cacheTimeZoneColors[idx].ColorAll == colorAll && cacheTimeZoneColors[idx].AlertBool == alertBool && cacheTimeZoneColors[idx].Region1Name == region1Name && cacheTimeZoneColors[idx].Region2Name == region2Name && cacheTimeZoneColors[idx].Region3Name == region3Name && cacheTimeZoneColors[idx].EqualsInput(input))
  394.                         return cacheTimeZoneColors[idx];
  395.             return CacheIndicator<TimeZoneColors>(new TimeZoneColors(){ Zn1HrSt = zn1HrSt, Zn1MinSt = zn1MinSt, Zn1HrEn = zn1HrEn, Zn1MinEn = zn1MinEn, Zn2HrSt = zn2HrSt, Zn2MinSt = zn2MinSt, Zn2HrEn = zn2HrEn, Zn2MinEn = zn2MinEn, Zn3HrSt = zn3HrSt, Zn3MinSt = zn3MinSt, Zn3HrEn = zn3HrEn, Zn3MinEn = zn3MinEn, ColorAll = colorAll, AlertBool = alertBool, Region1Name = region1Name, Region2Name = region2Name, Region3Name = region3Name }, input, ref cacheTimeZoneColors);
  396.         }
  397.     }
  398. }
  399.  
  400. namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
  401. {
  402.     public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
  403.     {
  404.         public Indicators.TimeZoneColors TimeZoneColors(int zn1HrSt, int zn1MinSt, int zn1HrEn, int zn1MinEn, int zn2HrSt, int zn2MinSt, int zn2HrEn, int zn2MinEn, int zn3HrSt, int zn3MinSt, int zn3HrEn, int zn3MinEn, bool colorAll, bool alertBool, string region1Name, string region2Name, string region3Name)
  405.         {
  406.             return indicator.TimeZoneColors(Input, zn1HrSt, zn1MinSt, zn1HrEn, zn1MinEn, zn2HrSt, zn2MinSt, zn2HrEn, zn2MinEn, zn3HrSt, zn3MinSt, zn3HrEn, zn3MinEn, colorAll, alertBool, region1Name, region2Name, region3Name);
  407.         }
  408.  
  409.         public Indicators.TimeZoneColors TimeZoneColors(ISeries<double> input , int zn1HrSt, int zn1MinSt, int zn1HrEn, int zn1MinEn, int zn2HrSt, int zn2MinSt, int zn2HrEn, int zn2MinEn, int zn3HrSt, int zn3MinSt, int zn3HrEn, int zn3MinEn, bool colorAll, bool alertBool, string region1Name, string region2Name, string region3Name)
  410.         {
  411.             return indicator.TimeZoneColors(input, zn1HrSt, zn1MinSt, zn1HrEn, zn1MinEn, zn2HrSt, zn2MinSt, zn2HrEn, zn2MinEn, zn3HrSt, zn3MinSt, zn3HrEn, zn3MinEn, colorAll, alertBool, region1Name, region2Name, region3Name);
  412.         }
  413.     }
  414. }
  415.  
  416. namespace NinjaTrader.NinjaScript.Strategies
  417. {
  418.     public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
  419.     {
  420.         public Indicators.TimeZoneColors TimeZoneColors(int zn1HrSt, int zn1MinSt, int zn1HrEn, int zn1MinEn, int zn2HrSt, int zn2MinSt, int zn2HrEn, int zn2MinEn, int zn3HrSt, int zn3MinSt, int zn3HrEn, int zn3MinEn, bool colorAll, bool alertBool, string region1Name, string region2Name, string region3Name)
  421.         {
  422.             return indicator.TimeZoneColors(Input, zn1HrSt, zn1MinSt, zn1HrEn, zn1MinEn, zn2HrSt, zn2MinSt, zn2HrEn, zn2MinEn, zn3HrSt, zn3MinSt, zn3HrEn, zn3MinEn, colorAll, alertBool, region1Name, region2Name, region3Name);
  423.         }
  424.  
  425.         public Indicators.TimeZoneColors TimeZoneColors(ISeries<double> input , int zn1HrSt, int zn1MinSt, int zn1HrEn, int zn1MinEn, int zn2HrSt, int zn2MinSt, int zn2HrEn, int zn2MinEn, int zn3HrSt, int zn3MinSt, int zn3HrEn, int zn3MinEn, bool colorAll, bool alertBool, string region1Name, string region2Name, string region3Name)
  426.         {
  427.             return indicator.TimeZoneColors(input, zn1HrSt, zn1MinSt, zn1HrEn, zn1MinEn, zn2HrSt, zn2MinSt, zn2HrEn, zn2MinEn, zn3HrSt, zn3MinSt, zn3HrEn, zn3MinEn, colorAll, alertBool, region1Name, region2Name, region3Name);
  428.         }
  429.     }
  430. }
  431.  
  432. #endregion
  433.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement