Ayuda Ninja Script
Publicado: 14 Feb 2010 02:43
				
				Hola, alguien que me eche una mano a ver donde está el fallo?   Solamente ejecuta la primera instrucción (Long)  y no obedece al filtro del MACD.
  
			Código: Seleccionar todo
    protected override void OnBarUpdate()
       
			{/// SetRanges///
			   
				/// Calculate the Asian Sesion Range...
                 if  (ToTime(Time[0]) == ToTime(8, 0, 0))
			{
              Variable0 = MAX(High, 5)[0];
			  Variable1 = MIN(Low,  5)[0];
			    DrawLine("Bull" + CurrentBar, 4, MAX(High, 5)[0], 0, Variable0, Color.Green);
				DrawLine("Bear" +CurrentBar,4,MIN(Low, 5)[0],0, Variable1,Color.Red);
			}	
		/// EnterLong ...
			
				if 	(GetCurrentAsk() + 2 * TickSize >= Variable0
			        &&  ToTime(Time[0])> ToTime(8,0,0)
					&& ToTime(Time[0])<= ToTime(10,0,0)
					&& MACD(12, 26, 9)[0] > MACD(12, 26, 9).Avg[0] )
				{
					EnterLong (InitialLot,"InitialBuy");
					DrawText("Buy" + CurrentBar, "", 0, Low[0] - 10 * TickSize, Color.Green);
				}
		/// EnterShort  ...
				if 	(GetCurrentBid() -2  * TickSize <= Variable1
			        &&  ToTime(Time[0])> ToTime(8,0,0)
					&& ToTime(Time[0])<= ToTime(10,0,0)
					&& MACD(12, 26, 9)[0] < MACD(12, 26, 9).Avg[0]) 
				{
					EnterShort (InitialLot,"InitialSell");
					DrawText("My text" + CurrentBar, "Sell", 0, High[0] + 10 * TickSize, Color.Red);
				}
					
}