代码下载:
自动画格子.zip
(620 Bytes, 下载次数: 8)
每逢30点画个线,神奇。
公式还相当不熟练,拼凑了老半天,日。
竟然也能生产产品,神奇。
- #property indicator_chart_window
- extern double 间距 = 30;
- extern bool 方向=false;
- extern int 数量 = 50;
- extern double xxx = 1.45;
- extern int 宽度 = 1;
- int deinit() {
- Delete();
- return (0);
- }
- int start()
- {
-
- if(!方向){
- for (int i = 0; i< 数量;i++) {
-
-
- ObjectCreate("网格"+i,OBJ_HLINE,0,0,xxx);//OBJ_HLINE
- ObjectCreate("网格"+2,OBJ_HLINE,0,0,xxx-0.003);//OBJ_HLINE
- ObjectCreate("网格"+3,OBJ_HLINE,0,0,xxx-0.006);//OBJ_HLINE
- ObjectCreate("网格"+4,OBJ_HLINE,0,0,xxx-0.009);//OBJ_HLINE
- ObjectCreate("网格"+5,OBJ_HLINE,0,0,xxx-0.012);//OBJ_HLINE
- ObjectCreate("网格"+6,OBJ_HLINE,0,0,xxx-0.015);//OBJ_HLINE
- ObjectCreate("网格"+7,OBJ_HLINE,0,0,xxx-0.018);//OBJ_HLINE
- ObjectCreate("网格"+8,OBJ_HLINE,0,0,xxx-0.021);//OBJ_HLINE
- ObjectCreate("网格"+9,OBJ_HLINE,0,0,xxx-0.024);//OBJ_HLINE
- ObjectCreate("网格"+10,OBJ_HLINE,0,0,xxx-0.027);//OBJ_HLINE
- ObjectCreate("网格"+11,OBJ_HLINE,0,0,xxx-0.030);//OBJ_HLINE
- ObjectCreate("网格"+12,OBJ_HLINE,0,0,xxx-0.033);//OBJ_HLINE
- ObjectCreate("网格"+13,OBJ_HLINE,0,0,xxx-0.036);//OBJ_HLINE
- ObjectCreate("网格"+14,OBJ_HLINE,0,0,xxx-0.039);//OBJ_HLINE
- ObjectCreate("网格"+15,OBJ_HLINE,0,0,xxx-0.042);//OBJ_HLINE
- ObjectSet("网格"+i, OBJPROP_STYLE, 2);
- ObjectSet("网格"+i, OBJPROP_WIDTH, 宽度);
- ObjectSet("网格"+i, OBJPROP_COLOR, Red);
- }
- }
- return(0);
- }
- //+------------------------------------------------------------------+
- void Delete(){
- for (int i = 0; i< 数量;i++) {
- ObjectDelete("网格"+i);
- }
- return (0);
-
- }
复制代码
|