Loading ...
Sorry, an error occurred while loading the content.

News Warning Study

Expand Messages
  • tradescripter
    This is another study I use on the price chart. So that s 7 studies that I use. #3-7-10 #Created by Tradescripter input Plot_830 = {default no , 830 }; def
    Message 1 of 1 , Mar 1, 2011
    • 0 Attachment
      This is another study I use on the price chart. So that's 7 studies that I use.

      #3-7-10
      #Created by Tradescripter

      input Plot_830 = {default "no","830"};
      def News830;
      switch(Plot_830) {
      case "no":
      News830 = 0;
      case "830":
      News830 = between(secondsTillTime(830),0,300);}

      input Plot_900 = {default "no","900"};
      def News900;
      switch(Plot_900) {
      case "no":
      News900 = 0;
      case "900":
      News900 = between(secondsTillTime(900),0,300);}

      input Plot_955 = {default "no","955"};
      def News955;
      switch(Plot_955) {
      case "no":
      News955 = 0;
      case "955":
      News955 = between(secondsTillTime(955),0,300);}

      input Plot_1000 = {default "no","1000"};
      def News1000;
      switch(Plot_1000) {
      case "no":
      News1000 = 0;
      case "1000":
      News1000 = between(secondsTillTime(1000),0,300);}

      input Plot_1015 = {default "no","1015"};
      def News1015;
      switch(Plot_1015) {
      case "no":
      News1015 = 0;
      case "1015":
      News1015 = between(secondsTillTime(1015),0,300);}

      input Plot_1030 = {default "no","1030"};
      def News1030;
      switch(Plot_1030) {
      case "no":
      News1030 = 0;
      case "1030":
      News1030 = between(secondsTillTime(1030),0,300);}

      input Plot_1400 = {default "no","1400"};
      def News1400;
      switch(Plot_1400) {
      case "no":
      News1400 = 0;
      case "1400":
      News1400 = between(secondsTillTime(1400),0,300);}

      input Plot_Custom = 1215;
      def NewsWarnCustom = between(secondsTillTime(Plot_Custom),0,300);

      def PlotSignal = News830 or News900 or News955 or News1000 or News1015 or News1030 or News1400 or NewsWarnCustom > 0;

      rec PlotLevel = if IsNan(PlotLevel[1]) then low * 0.9999 else if PlotSignal && !PlotSignal[1] then low * 0.9994 else PlotLevel[1];

      AddVerticalLine(PlotSignal && !PlotSignal[1], "NEWS!",COLOR.blue);

      plot Top = if PlotSignal then PlotLevel * 1.002 else double.nan;
      plot Bttm = if PlotSignal then PlotLevel else double.nan;

      addCloud(Top,Bttm,color.yellow,color.yellow);

      Top.SetDefaultColor(color.yellow);
      Bttm.SetDefaultColor(color.yellow);

      Top.HideBubble();
      Bttm.HideBubble();
    Your message has been successfully submitted and would be delivered to recipients shortly.