[原创]亚当指标 寻求改进为折线模式
连搜索都不能用 赚点积分 把我在别的网站的帖子 抓过几个来//+------------------------------------------------------------------+
//| ##########亚当指标.mq4 |
//| Copyright ?2008, MetaQuotes Software Corp. |
//| http://www.metaquotes.net
| //+------------------------------------------------------------------+ #property copyright "Copyright ?2008, MetaQuotes Software Corp." #property link "http://www.metaquotes.net
" #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //ObjectCreate //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- for(int i=0;i<30;i++) { CreatObject1("ARROW1"+i,i,i,Red); CreatObject2("ARROW2"+i,i,i,Green); } //---- return(0); } //+------------------------------------------------------------------+ int CreatObject1(string labelname,int x,int y,color ColorX) { ObjectDelete(labelname); if(Close[x]>=Close[0]) { ObjectCreate(labelname,OBJ_ARROW,0,Time[0]+(1+x)*Period()*60,Close[0]-MathAbs(Close[x]-Close[0])); // ObjectSet(labelname,OBJPROP_ARROWCODE,230); } if(Close[x]=Close[0])
{
ObjectCreate(labelname,OBJ_ARROW,0,Time[0]+(1+x)*Period()*60,Close[0]+MathAbs(Close[x]-Close[0]));
// ObjectSet(labelname,OBJPROP_ARROWCODE,228);
}
if(Close[x]
| //+------------------------------------------------------------------+ #property copyright "Copyright ?2008, MetaQuotes Software Corp." #property link "http://www.metaquotes.net
" #property indicator_chart_window //+------------------------------------------------------------------+ //| Custom indicator initialization function | //+------------------------------------------------------------------+ int init() { //---- indicators //ObjectCreate //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator deinitialization function | //+------------------------------------------------------------------+ int deinit() { //---- //---- return(0); } //+------------------------------------------------------------------+ //| Custom indicator iteration function | //+------------------------------------------------------------------+ int start() { int counted_bars=IndicatorCounted(); //---- for(int i=0;i<30;i++) { CreatObject1("ARROW1"+i,i,i,Red); CreatObject2("ARROW2"+i,i,i,Green); } //---- return(0); } //+------------------------------------------------------------------+ int CreatObject1(string labelname,int x,int y,color ColorX) { ObjectDelete(labelname); if(Close[x]>=Close[0]) { ObjectCreate(labelname,OBJ_ARROW,0,Time[0]+(1+x)*Period()*60,Close[0]-MathAbs(Close[x]-Close[0])); // ObjectSet(labelname,OBJPROP_ARROWCODE,230); } if(Close[x]