retesere20

example2

Nov 28th, 2018
84
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #region Using declarations
  2. using System;
  3. using System.Collections;
  4. using System.Collections.Generic;
  5. using System.ComponentModel;
  6. using System.ComponentModel.DataAnnotations;
  7. using System.Diagnostics.CodeAnalysis;
  8. using System.Windows;
  9. using System.Reflection;
  10. using System.Windows.Media;
  11. using System.Xml.Serialization;
  12. using NinjaTrader.Cbi;
  13. using NinjaTrader.Data;
  14. using NinjaTrader.Gui;
  15. using NinjaTrader.Gui.Chart;
  16. using NinjaTrader.Gui.Tools;
  17. using NinjaTrader.NinjaScript.DrawingTools;
  18. using NinjaTrader.NinjaScript.Indicators;
  19. using NinjaTrader.Gui.Tools;
  20.  
  21. #endregion
  22.  
  23. namespace NinjaTrader.NinjaScript.Indicators
  24. {
  25. public class YR_PivotPoints : Indicator
  26. {
  27.  
  28. private int i=0;
  29.  
  30. protected override void OnStateChange()
  31. {
  32. if (State == State.SetDefaults)
  33. {
  34. Name = "YR_PivotPoints";
  35. Description = "Rolling Hourly Pivots";
  36. Calculate = Calculate.OnBarClose;
  37. //IsOverlay = true;
  38. DisplayInDataBox = true;
  39. DrawOnPricePanel = true;
  40. DrawHorizontalGridLines = true;
  41. //DrawVerticalGridLines = true;
  42. PaintPriceMarkers = true;
  43. ScaleJustification = NinjaTrader.Gui.Chart.ScaleJustification.Right;
  44. //Disable this property if your indicator requires custom values that cumulate with each new market data event.
  45. //See Help Guide for additional information.
  46. IsSuspendedWhileInactive = true;
  47.  
  48. //customs
  49. Initialize();
  50. }
  51. else if (State == State.Configure)
  52. {
  53.  
  54. }
  55. else if (State == State.DataLoaded)
  56. {
  57. sessionIterator = new SessionIterator(Bars);
  58. }
  59. else if (State == State.Terminated)
  60. {
  61.  
  62. }
  63. }
  64.  
  65. private void Initialize()
  66. {
  67.  
  68. AddPlot(new Stroke(Brushes.White), PlotStyle.Hash, "PP");
  69.  
  70. //S
  71. for(i=1; i<=8; i++)
  72. AddPlot(new Stroke(Brushes.Green), PlotStyle.Hash, "S"+i.ToString() );
  73. //R
  74. for(i=1; i<=8; i++)
  75. AddPlot(new Stroke(Brushes.Red), PlotStyle.Hash, "R"+i.ToString() );
  76. //S middle
  77. for(i=1; i<=8; i++)
  78. AddPlot(new Stroke(Brushes.Green), PlotStyle.Cross, "S"+(i-1).ToString()+(i).ToString() );
  79. //R middle
  80. for(i=1; i<=8; i++)
  81. AddPlot(new Stroke(Brushes.Red), PlotStyle.Cross, "R"+(i-1).ToString()+(i).ToString() );
  82.  
  83. AddPlot(new Stroke(Brushes.Cyan), PlotStyle.Line, "PrevHigh" );
  84. AddPlot(new Stroke(Brushes.Cyan), PlotStyle.Line, "PrevLow" );
  85. AddPlot(new Stroke(Brushes.Cyan), PlotStyle.Line, "PrevClose" );
  86.  
  87. Calculate = Calculate.OnEachTick;
  88. IsOverlay = true;
  89. // NT8 REMOVED: PriceTypeSupported = false;
  90. IsAutoScale = false;
  91. }
  92.  
  93.  
  94. private DateTime currentDate = Core.Globals.MinDate;
  95. private double currentOpen = double.MinValue;
  96. private double currentHigh = double.MinValue;
  97. private double currentLow = double.MaxValue;
  98. private double currentClose = double.MinValue;
  99.  
  100. private DateTime lastDate = Core.Globals.MinDate;
  101. private double lastOpen = double.MinValue;
  102. private double lastHigh = double.MinValue;
  103. private double lastLow = double.MaxValue;
  104. private double lastClose = double.MinValue;
  105.  
  106. private Data.SessionIterator sessionIterator;
  107. private SimpleFont font = (new SimpleFont("Arial", 12));
  108.  
  109. private string labelType = "";
  110.  
  111. private string dayNum;
  112.  
  113. protected override void OnBarUpdate()
  114. {
  115. if (CurrentBar < 2) return;
  116.  
  117. if (Bars == null)
  118. return;
  119. //if (!Bars.BarsType.IsIntraday) return;
  120. //if (Bars.Period.Id == BarsPeriodType.Minute && Bars.Period.Value > 30) return;
  121. bool should_plot = false;
  122. bool is_Line_Transition=false;
  123. dayNum = Time[0].DayOfYear.ToString();
  124.  
  125. if (PivotMode == PivotModeEnums.Daily)
  126. {
  127. double curTime= ToTime(Time[0])/100;
  128. double prevTime= ToTime(Time[1])/100;
  129. if ( curTime >= SessionStart && curTime < SessionEnd)
  130. {
  131. should_plot = true;
  132. labelType = "d";
  133. //if (!Bars.BarsType.IsIntraday) return;
  134. lastDate = currentDate;
  135. currentDate = sessionIterator.GetTradingDay(Time[0]);
  136.  
  137. if (lastDate != currentDate || currentOpen == double.MinValue)
  138. {
  139. if(lastDate != currentDate)
  140. {
  141. lastOpen = currentOpen;
  142. lastHigh = currentHigh;
  143. lastLow = currentLow;
  144. lastClose = Time[0].DayOfYear != Time[1].DayOfYear ? Close[1] : Open[0];
  145. is_Line_Transition = true;
  146. }
  147. currentOpen = Open[0];
  148. currentHigh = High[0];
  149. currentLow = Low[0];
  150. currentClose = Close[0];
  151. }
  152. else
  153. {
  154. currentOpen = Open[0];
  155. currentHigh = Math.Max(currentHigh, High[0]);
  156. currentLow = Math.Min(currentLow, Low[0]);
  157. currentClose = Close[0];
  158. }
  159. }
  160.  
  161. if(ShowSessionVerticalLines)
  162. {
  163. if ( curTime >= SessionStart && prevTime < SessionStart)
  164. {
  165. Draw.VerticalLine(this, "Vline_start"+dayNum, Time[0], Brushes.Green);
  166. }
  167.  
  168. if ( curTime >= SessionEnd && prevTime < SessionEnd)
  169. {
  170. Draw.VerticalLine(this, "Vline_end"+dayNum, Time[0], Brushes.Red);
  171. }
  172.  
  173. }
  174. }
  175.  
  176. //if we should plot it or not
  177. if (should_plot)
  178. {
  179. double P = (lastHigh + lastLow + lastClose) / 3;
  180. double A = (lastHigh + lastLow)/2;
  181. double HL= (lastHigh - lastLow);
  182.  
  183. if (ShowPivotLine)
  184. {
  185. PP[0] = P;
  186. }
  187.  
  188. double remn = P-A; //shortcut
  189.  
  190. if (ShowResistanceLine)
  191. {
  192. R8[0] = P+HL*4.55 + (remn>0 ? HL*14/2 : HL*50/5);
  193. R7[0] = P+HL*3.28 + (remn>0 ? HL*12/2 : HL*35/5);
  194. R6[0] = P+HL*2.33 + (remn>0 ? HL*8/2 : HL*25/5);
  195. R5[0] = P+HL*1.6 + (remn>0 ? HL*6/2 : HL*15/5);
  196. R4[0] = P+HL*1.08 + (remn>0 ? HL*4/2 : HL*10/5);
  197. R3[0] = P+HL*0.68 + (remn>0 ? HL*3/2 : HL*6/5);
  198. R2[0] = P+HL*0.382 + (remn>0 ? HL*2/2 : HL*3/5);
  199. R1[0] = P+HL*0.1565 + (remn>0 ? HL*1/2 : HL*1/5);
  200. }
  201.  
  202. if (ShowSupportLine)
  203. {
  204. //as of the questionable request of client, I am doing this.
  205. if (SymetricLogic)
  206. {
  207. S1[0] = P-HL*0.1565 - (remn>0 ? HL*1/2 : HL*1/5) ;
  208. S2[0] = P-HL*0.382 - (remn>0 ? HL*2/2 : HL*3/5) ;
  209. S3[0] = P-HL*0.68 - (remn>0 ? HL*3/2 : HL*6/5) ;
  210. S4[0] = P-HL*1.08 - (remn>0 ? HL*4/2 : HL*10/5);
  211. S5[0] = P-HL*1.6 - (remn>0 ? HL*6/2 : HL*15/5);
  212. S6[0] = P-HL*2.33 - (remn>0 ? HL*8/2 : HL*25/5);
  213. S7[0] = P-HL*3.28 - (remn>0 ? HL*12/2 : HL*35/5);
  214. S8[0] = P-HL*4.55 - (remn>0 ? HL*14/2 : HL*50/5);
  215. }
  216. else
  217. {
  218. S1[0] = P-HL*0.1565 + (remn<0 ? HL*1/2 : HL*1/5) ;
  219. S2[0] = P-HL*0.382 + (remn<0 ? HL*2/2 : HL*3/5) ;
  220. S3[0] = P-HL*0.68 + (remn<0 ? HL*3/2 : HL*6/5) ;
  221. S4[0] = P-HL*1.08 + (remn<0 ? HL*4/2 : HL*10/5);
  222. S5[0] = P-HL*1.6 + (remn<0 ? HL*6/2 : HL*15/5);
  223. S6[0] = P-HL*2.33 + (remn<0 ? HL*8/2 : HL*25/5);
  224. S7[0] = P-HL*3.28 + (remn<0 ? HL*12/2 : HL*35/5);
  225. S8[0] = P-HL*4.55 + (remn<0 ? HL*14/2 : HL*50/5);
  226. }
  227. }
  228.  
  229. if(ShowPreviousDayLines)
  230. {
  231. PrevHigh[0]= lastHigh;
  232. PrevLow[0]= lastLow;
  233. PrevClose[0]= lastClose;
  234. }
  235. AssignLabels(0);
  236. }
  237.  
  238. }
  239.  
  240.  
  241. private void AssignLabels(int displace)
  242. {
  243. // show labels
  244. if (ShowLineLabels)
  245. {
  246. if (true) //(is_Line_Transition)
  247. {
  248. Series<double> val;
  249.  
  250. for (i=1; i<=8; i++)
  251. {
  252. foreach(string R_S in (new string[]{"R","S"}) )
  253. {
  254. if ( (R_S=="R" && ShowResistanceLine) || (R_S=="S" && ShowSupportLine) )
  255. {
  256. val = (Series<double>) this.GetType().GetProperty(R_S+i.ToString()).GetValue(this, null);
  257. Draw.Text(this, labelType+R_S+ i.ToString() + "_"+dayNum, true, labelType+R_S+ i.ToString(), Time[0], val[displace], 0, Brushes.White, font, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);
  258. }
  259. }
  260. }
  261.  
  262. if (ShowPivotLine)
  263. {
  264. Draw.Text(this, labelType+"P"+"_"+dayNum, true, labelType+"P", Time[0], PP[displace], 0, Brushes.White, font, TextAlignment.Center, Brushes.Transparent, Brushes.Transparent, 0);
  265. }
  266. }
  267. }
  268. }
  269.  
  270.  
  271. #region Properties
  272. public enum PivotModeEnums
  273. {
  274. Daily,
  275. Weekly,
  276. Monthly
  277. }
  278.  
  279. [NinjaScriptProperty]
  280. [Display(GroupName="User - Parameters", Order=10, Name="Pivot Mode")]
  281. public NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _PivotMode
  282. {
  283. get { return PivotMode; }
  284. set { PivotMode = value; }
  285. }
  286. private NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums PivotMode = NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums.Daily;
  287.  
  288.  
  289. [NinjaScriptProperty]
  290. [Display(GroupName="User - Parameters", Order=20, Name="Session start")]
  291. public int _SessionStart
  292. {
  293. get { return SessionStart; }
  294. set { SessionStart = value; }
  295. }
  296. private int SessionStart = 0600;
  297.  
  298.  
  299. [NinjaScriptProperty]
  300. [Display(GroupName="User - Parameters", Order=30, Name="Session end")]
  301. public int _SessionEnd
  302. {
  303. get { return SessionEnd; }
  304. set { SessionEnd = value; }
  305. }
  306. private int SessionEnd = 1700;
  307.  
  308.  
  309. [NinjaScriptProperty]
  310. [Display(GroupName="User - Parameters", Order=40, Name="Show Middle Lines")]
  311. public bool _ShowMiddleLines
  312. {
  313. get { return ShowMiddleLines; }
  314. set { ShowMiddleLines = value; }
  315. }
  316. private bool ShowMiddleLines = true;
  317.  
  318.  
  319.  
  320.  
  321. [NinjaScriptProperty]
  322. [Display(GroupName="User - Logic", Order=30, Name="Symetric Logic")]
  323. public bool _SymetricLogic
  324. {
  325. get { return SymetricLogic; }
  326. set { SymetricLogic = value; }
  327. }
  328. private bool SymetricLogic = true;
  329.  
  330.  
  331.  
  332. [NinjaScriptProperty]
  333. [Display(GroupName="User - Visuals", Order=20, Name="Show Pivot Line")]
  334. public bool _ShowPivotLine
  335. {
  336. get { return ShowPivotLine; }
  337. set { ShowPivotLine = value; }
  338. }
  339. private bool ShowPivotLine = true;
  340.  
  341.  
  342. [NinjaScriptProperty]
  343. [Display(GroupName="User - Visuals", Order=20, Name="Show Resistance Lines")]
  344. public bool _ShowResistanceLine
  345. {
  346. get { return ShowResistanceLine; }
  347. set { ShowResistanceLine = value; }
  348. }
  349. private bool ShowResistanceLine = true;
  350.  
  351.  
  352. [NinjaScriptProperty]
  353. [Display(GroupName="User - Visuals", Order=30, Name="Show Support Lines")]
  354. public bool _ShowSupportLine
  355. {
  356. get { return ShowSupportLine; }
  357. set { ShowSupportLine = value; }
  358. }
  359. private bool ShowSupportLine = true;
  360.  
  361.  
  362. [NinjaScriptProperty]
  363. [Display(GroupName="User - Visuals", Order=40, Name="Show Line-Labels")]
  364. public bool _ShowLineLabels
  365. {
  366. get { return ShowLineLabels; }
  367. set { ShowLineLabels = value; }
  368. }
  369. private bool ShowLineLabels = true;
  370.  
  371. [NinjaScriptProperty]
  372. [Display(GroupName="User - Visuals", Order=40, Name="Show Previous Day lines")]
  373. public bool _ShowPreviousDayLines
  374. {
  375. get { return ShowPreviousDayLines; }
  376. set { ShowPreviousDayLines = value; }
  377. }
  378. private bool ShowPreviousDayLines = true;
  379.  
  380. [NinjaScriptProperty]
  381. [Display(GroupName="User - Visuals", Order=40, Name="Show Session Vertical Lines")]
  382. public bool _ShowSessionVerticalLines
  383. {
  384. get { return ShowSessionVerticalLines; }
  385. set { ShowSessionVerticalLines = value; }
  386. }
  387. private bool ShowSessionVerticalLines = true;
  388.  
  389.  
  390.  
  391.  
  392.  
  393.  
  394. [Browsable(false)] // this line prevents the data series from being displayed in the indicator properties dialog, do not remove
  395. [XmlIgnore()] // this line ensures that the indicator can be saved/recovered as part of a chart template, do not remove
  396. public Series<double> PP
  397. {
  398. get { return Values[0]; }
  399. }
  400.  
  401. [Browsable(false)]
  402. [XmlIgnore()]
  403. public Series<double> S1
  404. {
  405. get { return Values[1]; }
  406. }
  407.  
  408. [Browsable(false)]
  409. [XmlIgnore()]
  410. public Series<double> S2
  411. {
  412. get { return Values[2]; }
  413. }
  414.  
  415. [Browsable(false)]
  416. [XmlIgnore()]
  417. public Series<double> S3
  418. {
  419. get { return Values[3]; }
  420. }
  421.  
  422. [Browsable(false)]
  423. [XmlIgnore()]
  424. public Series<double> S4
  425. {
  426. get { return Values[4]; }
  427. }
  428.  
  429. [Browsable(false)]
  430. [XmlIgnore()]
  431. public Series<double> S5
  432. {
  433. get { return Values[5]; }
  434. }
  435.  
  436. [Browsable(false)]
  437. [XmlIgnore()]
  438. public Series<double> S6
  439. {
  440. get { return Values[6]; }
  441. }
  442.  
  443. [Browsable(false)]
  444. [XmlIgnore()]
  445. public Series<double> S7
  446. {
  447. get { return Values[7]; }
  448. }
  449.  
  450. [Browsable(false)]
  451. [XmlIgnore()]
  452. public Series<double> S8
  453. {
  454. get { return Values[8]; }
  455. }
  456.  
  457. [Browsable(false)]
  458. [XmlIgnore()]
  459. public Series<double> R1
  460. {
  461. get { return Values[9]; }
  462. }
  463.  
  464. [Browsable(false)]
  465. [XmlIgnore()]
  466. public Series<double> R2
  467. {
  468. get { return Values[10]; }
  469. }
  470.  
  471. [Browsable(false)]
  472. [XmlIgnore()]
  473. public Series<double> R3
  474. {
  475. get { return Values[11]; }
  476. }
  477.  
  478. [Browsable(false)]
  479. [XmlIgnore()]
  480. public Series<double> R4
  481. {
  482. get { return Values[12]; }
  483. }
  484.  
  485. [Browsable(false)]
  486. [XmlIgnore()]
  487. public Series<double> R5
  488. {
  489. get { return Values[13]; }
  490. }
  491.  
  492. [Browsable(false)]
  493. [XmlIgnore()]
  494. public Series<double> R6
  495. {
  496. get { return Values[14]; }
  497. }
  498.  
  499. [Browsable(false)]
  500. [XmlIgnore()]
  501. public Series<double> R7
  502. {
  503. get { return Values[15]; }
  504. }
  505.  
  506. [Browsable(false)]
  507. [XmlIgnore()]
  508. public Series<double> R8
  509. {
  510. get { return Values[16]; }
  511. }
  512.  
  513. [Browsable(false)]
  514. [XmlIgnore()]
  515. public Series<double> S01
  516. {
  517. get { return Values[17]; }
  518. }
  519.  
  520. [Browsable(false)]
  521. [XmlIgnore()]
  522. public Series<double> S12
  523. {
  524. get { return Values[18]; }
  525. }
  526.  
  527. [Browsable(false)]
  528. [XmlIgnore()]
  529. public Series<double> S23
  530. {
  531. get { return Values[19]; }
  532. }
  533.  
  534. [Browsable(false)]
  535. [XmlIgnore()]
  536. public Series<double> S34
  537. {
  538. get { return Values[20]; }
  539. }
  540.  
  541. [Browsable(false)]
  542. [XmlIgnore()]
  543. public Series<double> S45
  544. {
  545. get { return Values[21]; }
  546. }
  547.  
  548. [Browsable(false)]
  549. [XmlIgnore()]
  550. public Series<double> S56
  551. {
  552. get { return Values[22]; }
  553. }
  554.  
  555. [Browsable(false)]
  556. [XmlIgnore()]
  557. public Series<double> S67
  558. {
  559. get { return Values[23]; }
  560. }
  561.  
  562. [Browsable(false)]
  563. [XmlIgnore()]
  564. public Series<double> S78
  565. {
  566. get { return Values[24]; }
  567. }
  568.  
  569. [Browsable(false)]
  570. [XmlIgnore()]
  571. public Series<double> R01
  572. {
  573. get { return Values[25]; }
  574. }
  575.  
  576. [Browsable(false)]
  577. [XmlIgnore()]
  578. public Series<double> R12
  579. {
  580. get { return Values[26]; }
  581. }
  582.  
  583. [Browsable(false)]
  584. [XmlIgnore()]
  585. public Series<double> R23
  586. {
  587. get { return Values[27]; }
  588. }
  589.  
  590. [Browsable(false)]
  591. [XmlIgnore()]
  592. public Series<double> R34
  593. {
  594. get { return Values[28]; }
  595. }
  596.  
  597. [Browsable(false)]
  598. [XmlIgnore()]
  599. public Series<double> R45
  600. {
  601. get { return Values[29]; }
  602. }
  603.  
  604. [Browsable(false)]
  605. [XmlIgnore()]
  606. public Series<double> R56
  607. {
  608. get { return Values[30]; }
  609. }
  610.  
  611. [Browsable(false)]
  612. [XmlIgnore()]
  613. public Series<double> R67
  614. {
  615. get { return Values[21]; }
  616. }
  617.  
  618. [Browsable(false)]
  619. [XmlIgnore()]
  620. public Series<double> R78
  621. {
  622. get { return Values[32]; }
  623. }
  624.  
  625.  
  626.  
  627. [Browsable(false)]
  628. [XmlIgnore()]
  629. public Series<double> PrevHigh
  630. {
  631. get { return Values[33]; }
  632. }
  633.  
  634. [Browsable(false)]
  635. [XmlIgnore()]
  636. public Series<double> PrevLow
  637. {
  638. get { return Values[34]; }
  639. }
  640.  
  641. [Browsable(false)]
  642. [XmlIgnore()]
  643. public Series<double> PrevClose
  644. {
  645. get { return Values[35]; }
  646. }
  647. #endregion
  648. }
  649. }
  650.  
  651. #region NinjaScript generated code. Neither change nor remove.
  652.  
  653. namespace NinjaTrader.NinjaScript.Indicators
  654. {
  655. public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
  656. {
  657. private YR_PivotPoints[] cacheYR_PivotPoints;
  658. public YR_PivotPoints YR_PivotPoints(NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _pivotMode, int _sessionStart, int _sessionEnd, bool _showMiddleLines, bool _symetricLogic, bool _showPivotLine, bool _showResistanceLine, bool _showSupportLine, bool _showLineLabels, bool _showPreviousDayLines, bool _showSessionVerticalLines)
  659. {
  660. return YR_PivotPoints(Input, _pivotMode, _sessionStart, _sessionEnd, _showMiddleLines, _symetricLogic, _showPivotLine, _showResistanceLine, _showSupportLine, _showLineLabels, _showPreviousDayLines, _showSessionVerticalLines);
  661. }
  662.  
  663. public YR_PivotPoints YR_PivotPoints(ISeries<double> input, NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _pivotMode, int _sessionStart, int _sessionEnd, bool _showMiddleLines, bool _symetricLogic, bool _showPivotLine, bool _showResistanceLine, bool _showSupportLine, bool _showLineLabels, bool _showPreviousDayLines, bool _showSessionVerticalLines)
  664. {
  665. if (cacheYR_PivotPoints != null)
  666. for (int idx = 0; idx < cacheYR_PivotPoints.Length; idx++)
  667. if (cacheYR_PivotPoints[idx] != null && cacheYR_PivotPoints[idx]._PivotMode == _pivotMode && cacheYR_PivotPoints[idx]._SessionStart == _sessionStart && cacheYR_PivotPoints[idx]._SessionEnd == _sessionEnd && cacheYR_PivotPoints[idx]._ShowMiddleLines == _showMiddleLines && cacheYR_PivotPoints[idx]._SymetricLogic == _symetricLogic && cacheYR_PivotPoints[idx]._ShowPivotLine == _showPivotLine && cacheYR_PivotPoints[idx]._ShowResistanceLine == _showResistanceLine && cacheYR_PivotPoints[idx]._ShowSupportLine == _showSupportLine && cacheYR_PivotPoints[idx]._ShowLineLabels == _showLineLabels && cacheYR_PivotPoints[idx]._ShowPreviousDayLines == _showPreviousDayLines && cacheYR_PivotPoints[idx]._ShowSessionVerticalLines == _showSessionVerticalLines && cacheYR_PivotPoints[idx].EqualsInput(input))
  668. return cacheYR_PivotPoints[idx];
  669. return CacheIndicator<YR_PivotPoints>(new YR_PivotPoints(){ _PivotMode = _pivotMode, _SessionStart = _sessionStart, _SessionEnd = _sessionEnd, _ShowMiddleLines = _showMiddleLines, _SymetricLogic = _symetricLogic, _ShowPivotLine = _showPivotLine, _ShowResistanceLine = _showResistanceLine, _ShowSupportLine = _showSupportLine, _ShowLineLabels = _showLineLabels, _ShowPreviousDayLines = _showPreviousDayLines, _ShowSessionVerticalLines = _showSessionVerticalLines }, input, ref cacheYR_PivotPoints);
  670. }
  671. }
  672. }
  673.  
  674. namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
  675. {
  676. public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
  677. {
  678. public Indicators.YR_PivotPoints YR_PivotPoints(NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _pivotMode, int _sessionStart, int _sessionEnd, bool _showMiddleLines, bool _symetricLogic, bool _showPivotLine, bool _showResistanceLine, bool _showSupportLine, bool _showLineLabels, bool _showPreviousDayLines, bool _showSessionVerticalLines)
  679. {
  680. return indicator.YR_PivotPoints(Input, _pivotMode, _sessionStart, _sessionEnd, _showMiddleLines, _symetricLogic, _showPivotLine, _showResistanceLine, _showSupportLine, _showLineLabels, _showPreviousDayLines, _showSessionVerticalLines);
  681. }
  682.  
  683. public Indicators.YR_PivotPoints YR_PivotPoints(ISeries<double> input , NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _pivotMode, int _sessionStart, int _sessionEnd, bool _showMiddleLines, bool _symetricLogic, bool _showPivotLine, bool _showResistanceLine, bool _showSupportLine, bool _showLineLabels, bool _showPreviousDayLines, bool _showSessionVerticalLines)
  684. {
  685. return indicator.YR_PivotPoints(input, _pivotMode, _sessionStart, _sessionEnd, _showMiddleLines, _symetricLogic, _showPivotLine, _showResistanceLine, _showSupportLine, _showLineLabels, _showPreviousDayLines, _showSessionVerticalLines);
  686. }
  687. }
  688. }
  689.  
  690. namespace NinjaTrader.NinjaScript.Strategies
  691. {
  692. public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
  693. {
  694. public Indicators.YR_PivotPoints YR_PivotPoints(NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _pivotMode, int _sessionStart, int _sessionEnd, bool _showMiddleLines, bool _symetricLogic, bool _showPivotLine, bool _showResistanceLine, bool _showSupportLine, bool _showLineLabels, bool _showPreviousDayLines, bool _showSessionVerticalLines)
  695. {
  696. return indicator.YR_PivotPoints(Input, _pivotMode, _sessionStart, _sessionEnd, _showMiddleLines, _symetricLogic, _showPivotLine, _showResistanceLine, _showSupportLine, _showLineLabels, _showPreviousDayLines, _showSessionVerticalLines);
  697. }
  698.  
  699. public Indicators.YR_PivotPoints YR_PivotPoints(ISeries<double> input , NinjaTrader.NinjaScript.Indicators.YR_PivotPoints.PivotModeEnums _pivotMode, int _sessionStart, int _sessionEnd, bool _showMiddleLines, bool _symetricLogic, bool _showPivotLine, bool _showResistanceLine, bool _showSupportLine, bool _showLineLabels, bool _showPreviousDayLines, bool _showSessionVerticalLines)
  700. {
  701. return indicator.YR_PivotPoints(input, _pivotMode, _sessionStart, _sessionEnd, _showMiddleLines, _symetricLogic, _showPivotLine, _showResistanceLine, _showSupportLine, _showLineLabels, _showPreviousDayLines, _showSessionVerticalLines);
  702. }
  703. }
  704. }
  705.  
  706. #endregion
RAW Paste Data