// Downloaded From https://www.WiseStockTrader.com
_SECTION_BEGIN("Teste");
SetChartOptions(1,chartShowArrows|chartShowDates|chartLogarithmic );
Plot( C, "Close", ParamColor("Color", colorDefault ), styleNoTitle | ParamStyle("Style") | GetPriceStyle() ); 
_N( Title =  StrFormat("[\\c40 %g ],   \\c32[(  %g  )],   \\c35[ %g ],   \\c36[ %g ],   \\c43[ %g ],   \\c50[ %g ],  \\c55[ %g ]
[\\c40 %g ],   \\c32[(  %g  )],   \\c35[ %g ],   \\c36[ %g ],   \\c43[ %g ],   \\c50[ %g ],  \\c55[ %g ]",  
                        Ref(H,-6),Ref(H,-5), Ref(H,-4), Ref(H,-3), Ref(H,-2), Ref(H,-1), Ref(H,-0),  
                        Ref(L,-6),Ref(L,-5), Ref(L,-4), Ref(L,-3), Ref(L,-2), Ref(L,-1), Ref(L,-0)   ));    
//=======================================================================

mt1 =           Ref(H,00) <= Ref(H,-5)+5 AND Ref(L,00) >= Ref(L,-5)-5;
mt2 =  mt1 AND  Ref(H,-1) <= Ref(H,-5)+5 AND Ref(L,-1) >= Ref(L,-5)-5;
mt3 =  mt2 AND  Ref(H,-2) <= Ref(H,-5)+5 AND Ref(L,-2) >= Ref(L,-5)-5;
mt4 =  mt3 AND  Ref(H,-3) <= Ref(H,-5)+5 AND Ref(L,-3) >= Ref(L,-5)-5;
mt5 =  mt4 AND  Ref(H,-4) <= Ref(H,-5)+5 AND Ref(L,-4) >= Ref(L,-5)-5;

PrecoH = (    SelectedValue(TimeFrameGetPrice( "H", in1Minute, -1 ))        );
PrecoL = (    SelectedValue(TimeFrameGetPrice( "L", in1Minute, -1 ))        );
Plot (PrecoH,"",30,4096);
Plot (PrecoL,"",49,4096);

for (i=0; i<BarCount; i++)
{ 

  if ( mt5[i] )    PlotText("......", i, (H[ i-5 ]+60), 55);
  if ( mt5[i] )    PlotText("  :",  i, (H[ i-5 ]+55), 55);
  if ( mt5[i] )    PlotText("  :",  i, (H[ i-5 ]+45), 55);
  if ( mt5[i] )    PlotText("  :",  i, (H[ i-5 ]+35), 55);
  if ( mt5[i] )    PlotText("  :",  i, (H[ i-5 ]+25), 55);
  if ( mt5[i] )    PlotText("  :",  i, (H[ i-5 ]+15), 55);
  if ( mt5[i] )    PlotText("..:..",  i, (H[ i-5 ]+05), 55);


  if ( mt5[i] )    PlotText(".....",  i, (L[ i-5 ]-05), 55);
  if ( mt5[i] )    PlotText("  :",  i, (L[ i-5 ]-15), 55);
  if ( mt5[i] )    PlotText("  :",  i, (L[ i-5 ]-25), 55);
  if ( mt5[i] )    PlotText("  :",  i, (L[ i-5 ]-35), 55);
  if ( mt5[i] )    PlotText("  :",  i, (L[ i-5 ]-45), 55);
  if ( mt5[i] )    PlotText("  :",  i, (L[ i-5 ]-55), 55);
  if ( mt5[i] )    PlotText("  "+(L[ i-5 ]-60),  i, (L[ i-5 ]-60), 55);

  if ( mt5[i] )    PlotText("................", i-5, H[ i-5 ]+5, 36);  
  if ( mt5[i] )    PlotText(""+(H[ i-5 ]+10), i-5, H[ i-5 ]+07, 36);      
  if ( mt5[i] )    PlotText("................", i-5, L[ i-5 ]-5, 40);  
  if ( mt5[i] )    PlotText(""+(L[ i-5 ]-10), i-5, L[ i-5 ]-10, 40);    

}
 
Plot(EMA(C,9),"", 25, 4096 ); 
Plot(EMA(C,72),"", 35, 4096 ); 

_SECTION_END();