//+------------------------------------------------------------------+
//| chaos 2.mq4 |
//| Samurai |
//| |
//+------------------------------------------------------------------+
#property copyright "Samurai"
#property link ""
#property indicator_chart_window
#property indicator_buffers 2
//+------------------------------------------------------------------+
//| Custom indicator initialization function |
//+------------------------------------------------------------------+
int init()
{
//---- indicators
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator deinitialization function |
//+------------------------------------------------------------------+
int deinit()
{
//----
ObjectDelete("up1");
ObjectDelete("down1");
//----
return(0);
}
//+------------------------------------------------------------------+
//| Custom indicator iteration function |
//+------------------------------------------------------------------+
int start()
{
//----
if (iAC(0,0,0)>iAC(0,0,1) && iAC(0,0,2) > iAC(0,0,1))
{
ObjectCreate("up1", OBJ_ARROW,0,Time[1],High[1] + 0.0002);
ObjectSet("up1",OBJPROP_COLOR,Green);
ObjectSet("up1",OBJPROP_ARROWCODE,SYMBOL_RIGHTPRICE);
ObjectDelete("down1");
}
if (iAC(0,0,0)<iAC(0,0,1) && iAC(0,0,2) < iAC(0,0,1))
{
ObjectCreate("down1", OBJ_ARROW,0,Time[1],Low[1] - 0.0002);
ObjectSet("down1",OBJPROP_ARROWCODE,SYMBOL_LEFTPRICE);
ObjectSet("down1",OBJPROP_COLOR,Red);
ObjectDelete("up1");
}
//----
return(0);
}
//+------------------------------------------------------------------+
Comments