龙听期货论坛's Archiver

龙听 发表于 2020-6-3 08:33

Cog Stochastic and Fx Trend Trading System

Cog Stocastic Indicator
Submit by JamesUK 31/10/2010

Time Frame 30 min or higher;

Currency pairs: any;

Indicator:

COGSTOCH Indicator;

FX Trend;

Pivot point multitimframe;

Polynomial Regression trading
rules for opening orders

Buy order : open buy order when the indicator Cogstochastic crosses upward into aqua bands and fx trend indicator is color aqua;

Stop loss 2 pips abpve previous swing;

Sell order :open Sell order when the indicator Cogstochastic crosses downward into red bands and fx trend indicator is color red;
Stop loss 2 pips below previous swing;

Exit position, options,:

1)On the levels pivot;

2) when FX trend indicator change color;

3) with profit target predetermined depends by time frame and currency pairs.

This is an strategy for binary option. High Low binary option trading strategy (60 min)

Time Frame 30 min.

In the pictures Cog Stochastic and FX Trend forex system in action.

Share your opinion, can help everyone to understand the forex strategy.

龙听 发表于 2020-6-3 08:34

[b]齿轮随机和外汇趋势交易系统[/b]
嵌齿轮定指标

由JamesUK提交2010年10月31日

时限30分钟或以上;

货币对:任意;

[b]指标:[/b]
COGSTOCH指标;

外汇趋势 ;

枢轴点多帧 ;

[b]多项式回归交易[/b]
开仓规则

买单:当指标Cogstochastic向上跨入水色带且fx趋势指标为有色水色时,打开买入订单 ;

止损较上个交易日高出2个基点;

卖单:当指标Cogstochastic向下穿过红色带并且FX趋势指标为红色时,打开卖单。
止损比前一个波动低2个基点;

[b]出口位置,选项:[/b]

1)在水平轴上;

2)当外汇趋势指标改变颜色时;

3)预定的利润目标取决于时间范围和货币对。


这是二元期权的策略。高低二元期权交易策略(60分钟)

时限30分钟
[img]http://p.qhlt.cn/filestores/2020/06/03/c080f7b5635f8ce1a00258b7f65b9ef2.gif[/img]
[img]http://p.qhlt.cn/filestores/2020/06/03/4512db0e19bcae2e125711cb72f64435.gif[/img]
图片中的Cog随机指标和FX Trend 外汇系统 正在运行。

龙听 发表于 2020-6-3 08:39

COGSTOCH指标
[code]
//+------------------------------------------------------------------+
//|                                                     COGSTOCH.mq4 |
//| Original Code from NG3110@latchess.com                           |                                    
//| Linuxser 2007 for TSD    http://www.forex-tsd.com/               |
//| Stoch Modified Brooky    http://www.brooky-indicators.com        |
//+------------------------------------------------------------------+
#property  copyright "ANG3110@latchess.com"
//---------ang_pr (Din)--------------------
#property indicator_separate_window
#property indicator_buffers 7
#property indicator_color1 Gray
#property indicator_color2 IndianRed
#property indicator_color3 CadetBlue
#property indicator_color4 Pink
#property indicator_color5 PowderBlue
#property indicator_color6 Blue
#property indicator_color7 Red


#property indicator_level1 80
#property indicator_level2 50
#property indicator_level3 20
#property indicator_level4 100
#property indicator_level5 00

#property indicator_style1 1
#property indicator_style7 2

#property indicator_width2 2
#property indicator_width3 2


//-----------------------------------
extern int bars_back = 192;
extern int stoch_k = 14;
extern int stoch_d = 5;
extern int stoch_s = 3;


extern int m = 5;
extern int i = 1;
extern double kstd = 1.618;
extern double kstd.internal = 0.8;
extern int sName = 2;
//-----------------------
double fx[], sqh[], sql[], stdh[], stdl[], stochdata[], stochsdata[];
double ai[10,10], b[10], x[10], sx[20];
double sum;
int    ip, p, n, f;
double qq, mm, tt;
int    ii, jj, kk, ll, nn;
double sq, std;
//*******************************************
int init()
{
   IndicatorShortName("COGSTOCH: Mod by Brooky-Indicators.com");
   
   SetIndexBuffer(0, fx);SetIndexStyle(0, DRAW_LINE);
   SetIndexBuffer(1, sqh);
   SetIndexBuffer(2, sql);
   SetIndexBuffer(3, stdh);
   SetIndexBuffer(4, stdl);
   SetIndexBuffer(5, stochdata);SetIndexStyle(5, DRAW_LINE);
   SetIndexBuffer(6, stochsdata);SetIndexStyle(6, DRAW_LINE);
   p = MathRound(bars_back);
   
   nn = m + 1;
   ObjectCreate("sstart" + sName, 22, 0, Time[p], fx[p]);
   ObjectSet("sstart" + sName, 14, 159);
   return(0);
}
//----------------------------------------------------------
int deinit()
{
   ObjectDelete("sstart" + sName);
}
//**********************************************************************************************
int start()
{
   int mi;
//-------------------------------------------------------------------------------------------
   ip = iBarShift(Symbol(), Period(), ObjectGet("sstart" + sName, OBJPROP_TIME1));
   p = bars_back;
   sx[1] = p + 1;
   SetIndexDrawBegin(0, Bars - p - 1);
   SetIndexDrawBegin(1, Bars - p - 1);
   SetIndexDrawBegin(2, Bars - p - 1);
   SetIndexDrawBegin(3, Bars - p - 1);
   SetIndexDrawBegin(4, Bars - p - 1);
//----------------------sx-------------------------------------------------------------------

     int rlimit;
     int rcounted_bars=IndicatorCounted();
  //---- check for possible errors
     if(rcounted_bars<0) return(-1);
  //---- the last counted bar will be recounted
     if(rcounted_bars>0) rcounted_bars--;
     rlimit=Bars-rcounted_bars;
  //---- main loop
     for(int ri=0; ri<rlimit; ri++)
       {
      
       stochdata[ri]= iStochastic(NULL,0,stoch_k,stoch_d,stoch_s,MODE_SMA,0,MODE_MAIN,ri);
       stochsdata[ri]= iStochastic(NULL,0,stoch_k,stoch_d,stoch_s,MODE_SMA,0,MODE_SIGNAL,ri);
       }


   for(mi = 1; mi <= nn * 2 - 2; mi++)
   {
      sum = 0;
      for(n = i; n <= i + p; n++)
      {
         sum += MathPow(n, mi);
      }
      sx[mi + 1] = sum;
   }  
//----------------------syx-----------
   for(mi = 1; mi <= nn; mi++)
   {
   
      sum = 0.00000;
      for(n = i; n <= i + p; n++)
      {
         if(mi == 1)
            sum += iStochastic(NULL,0,stoch_k,stoch_d,stoch_s,MODE_SMA,0,MODE_MAIN,n);//rsi_period  iRSI(NULL,0,rsi_period,prICE_CLOSE,n)
         else
            sum += iStochastic(NULL,0,stoch_k,stoch_d,stoch_s,MODE_SMA,0,MODE_MAIN,n) * MathPow(n, mi - 1);
      }
      b[mi] = sum;
   }
//===============Matrix=======================================================================================================
   for(jj = 1; jj <= nn; jj++)
   {
      for(ii = 1; ii <= nn; ii++)
      {
         kk = ii + jj - 1;
         ai[ii, jj] = sx[kk];
      }
   }  
//===============Gauss========================================================================================================
   for(kk = 1; kk <= nn - 1; kk++)
   {
      ll = 0; mm = 0;
      for(ii = kk; ii <= nn; ii++)
      {
         if(MathAbs(ai[ii, kk]) > mm)
         {
            mm = MathAbs(ai[ii, kk]);
            ll = ii;
         }
      }
      if(ll == 0)
         return(0);   

      if(ll != kk)
      {
         for(jj = 1; jj <= nn; jj++)
         {
            tt = ai[kk, jj];
            ai[kk, jj] = ai[ll, jj];
            ai[ll, jj] = tt;
         }
         tt = b[kk]; b[kk] = b[ll]; b[ll] = tt;
      }  
      for(ii = kk + 1; ii <= nn; ii++)
      {
         qq = ai[ii, kk] / ai[kk, kk];
         for(jj = 1; jj <= nn; jj++)
         {
            if(jj == kk)
               ai[ii, jj] = 0;
            else
               ai[ii, jj] = ai[ii, jj] - qq * ai[kk, jj];
         }
         b[ii] = b[ii] - qq * b[kk];
      }
   }  
   x[nn] = b[nn] / ai[nn, nn];
   for(ii = nn - 1; ii >= 1; ii--)
   {
      tt = 0;
      for(jj = 1; jj <= nn - ii; jj++)
      {
         tt = tt + ai[ii, ii + jj] * x[ii + jj];
         x[ii] = (1 / ai[ii, ii]) * (b[ii] - tt);
      }
   }
//===========================================================================================================================
   for(n = i; n <= i + p; n++)
   {
      sum = 0;
      for(kk = 1; kk <= m; kk++)
      {
         sum += x[kk + 1] * MathPow(n, kk);
      }
      fx[n] = x[1] + sum;
   }
//-----------------------------------Std-----------------------------------------------------------------------------------
   sq = 0.0;
   for(n = i; n <= i + p; n++)
   {
      sq += MathPow(iStochastic(NULL,0,stoch_k,stoch_d,stoch_s,MODE_SMA,0,MODE_MAIN,n) - fx[n], 2);
   }
   sq = MathSqrt(sq / (p + 1)) * kstd;
   std = iStdDevOnArray(stochdata,0,p,0,MODE_SMA,i) *kstd.internal;
   for(n = i; n <= i + p; n++)
   {
      sqh[n] = fx[n] + sq;
      sql[n] = fx[n] - sq;
      stdh[n] = fx[n] + std;
      stdl[n] = fx[n] - std;
   }
//-------------------------------------------------------------------------------
   ObjectMove("sstart" + sName, 0, Time[p], fx[p]);
//----------------------------------------------------------------------------------------------------------------------------
   return(0);
}
//==========================================================================================================================   
[/code]

龙听 发表于 2020-6-3 08:41

枢轴点多时间框架([size=14.4px]Pivot point multitimframe[/size])
[code]
/*
   Generated by EX4-TO-MQ4 decompiler V4.0.224.1 []
   Website: http://purebeam.biz
   E-mail : purebeam@gmail.com
*/
#property copyright "Copyright ?2004, MetaQuotes Software Corp."
#property link      "http://www.metaquotes.net"

#property indicator_chart_window
#property indicator_buffers 4
#property indicator_color1 CLR_NONE
#property indicator_color2 Black
#property indicator_color3 Black
#property indicator_color4 Black

extern bool midpivots = FALSE;
extern bool Fhr = FALSE;
extern bool daily = TRUE;
extern bool weekly = TRUE;
extern bool monthly = TRUE;
extern int Period1 = 1440;
double gd_100 = 0.0;
double gd_108 = 0.0;
double gd_116 = 0.0;
double gd_unused_124 = 0.0;
double gd_132 = 0.0;
double gd_140 = 0.0;
double gd_unused_148 = 0.0;
double gd_unused_156 = 0.0;
double gd_unused_164 = 0.0;
double g_price_172 = 0.0;
double gd_180 = 0.0;
double g_price_188;
double g_price_196;
double g_price_204;
double g_price_212;
double g_price_220;
double g_price_228;
double g_price_236;
double g_price_244;
double g_price_252;
double g_price_260;
double g_price_268;
double g_price_276;
double gd_284 = 0.0;
double gd_292 = 0.0;
double gd_300 = 0.0;
double gda_308[2][6];
double g_ibuf_312[];
double gd_316 = 0.0;
double gd_324 = 0.0;
double gd_332 = 0.0;
double gd_unused_340 = 0.0;
double gd_348 = 0.0;
double gd_356 = 0.0;
double gd_unused_364 = 0.0;
double gd_unused_372 = 0.0;
double gd_unused_380 = 0.0;
double g_price_388 = 0.0;
double gd_396 = 0.0;
double g_price_404;
double g_price_412;
double g_price_420;
double g_price_428;
double g_price_436;
double g_price_444;
double g_price_452;
double g_price_460;
double g_price_468;
double g_price_476;
double g_price_484;
double g_price_492;
double gd_500 = 0.0;
double gd_508 = 0.0;
double gd_516 = 0.0;
double gda_524[2][6];
double g_ibuf_528[];
double gd_532 = 0.0;
double gd_540 = 0.0;
double gd_548 = 0.0;
double gd_unused_556 = 0.0;
double gd_564 = 0.0;
double gd_572 = 0.0;
double gd_unused_580 = 0.0;
double gd_unused_588 = 0.0;
double gd_unused_596 = 0.0;
double g_price_604 = 0.0;
double gd_612 = 0.0;
double g_price_620;
double g_price_628;
double g_price_636;
double g_price_644;
double g_price_652;
double g_price_660;
double g_price_668;
double g_price_676;
double g_price_684;
double g_price_692;
double g_price_700;
double g_price_708;
double gd_716 = 0.0;
double gd_724 = 0.0;
double gd_732 = 0.0;
double gda_740[2][6];
double g_ibuf_744[];
double gd_748 = 0.0;
double gd_756 = 0.0;
double gd_764 = 0.0;
double gd_unused_772 = 0.0;
double gd_780 = 0.0;
double gd_788 = 0.0;
double gd_unused_796 = 0.0;
double gd_unused_804 = 0.0;
double gd_unused_812 = 0.0;
double g_price_820 = 0.0;
double gd_828 = 0.0;
double g_price_836;
double g_price_844;
double g_price_852;
double g_price_860;
double g_price_868;
double g_price_876;
double g_price_884;
double g_price_892;
double g_price_900;
double g_price_908;
double g_price_916;
double g_price_924;
double gd_932 = 0.0;
double gd_940 = 0.0;
double gd_948 = 0.0;
double gda_956[2][6];
double g_ibuf_960[];

int init() {
   IndicatorBuffers(4);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 159);
   SetIndexBuffer(0, g_ibuf_312);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 159);
   SetIndexBuffer(1, g_ibuf_528);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 159);
   SetIndexBuffer(2, g_ibuf_744);
   SetIndexStyle(0, DRAW_ARROW);
   SetIndexArrow(0, 159);
   SetIndexBuffer(3, g_ibuf_960);
   g_price_404 = 0;
   g_price_412 = 0;
   g_price_420 = 0;
   g_price_428 = 0;
   g_price_436 = 0;
   g_price_444 = 0;
   g_price_452 = 0;
   g_price_460 = 0;
   g_price_468 = 0;
   g_price_476 = 0;
   g_price_484 = 0;
   g_price_492 = 0;
   g_price_620 = 0;
   g_price_628 = 0;
   g_price_636 = 0;
   g_price_644 = 0;
   g_price_652 = 0;
   g_price_660 = 0;
   g_price_668 = 0;
   g_price_676 = 0;
   g_price_684 = 0;
   g_price_692 = 0;
   g_price_700 = 0;
   g_price_708 = 0;
   g_price_836 = 0;
   g_price_844 = 0;
   g_price_852 = 0;
   g_price_860 = 0;
   g_price_868 = 0;
   g_price_876 = 0;
   g_price_884 = 0;
   g_price_892 = 0;
   g_price_900 = 0;
   g_price_908 = 0;
   g_price_916 = 0;
   g_price_924 = 0;
   g_price_188 = 0;
   g_price_196 = 0;
   g_price_204 = 0;
   g_price_212 = 0;
   g_price_220 = 0;
   g_price_228 = 0;
   g_price_236 = 0;
   g_price_244 = 0;
   g_price_252 = 0;
   g_price_260 = 0;
   g_price_268 = 0;
   g_price_276 = 0;
   return (0);
}

int deinit() {
   ObjectDelete("Fhr_R1 Label");
   ObjectDelete("Fhr_R1 Line");
   ObjectDelete("Fhr_R2 Label");
   ObjectDelete("Fhr_R2 Line");
   ObjectDelete("Fhr_R3 Label");
   ObjectDelete("Fhr_R3 Line");
   ObjectDelete("Fhr_S1 Label");
   ObjectDelete("Fhr_S1 Line");
   ObjectDelete("Fhr_S2 Label");
   ObjectDelete("Fhr_S2 Line");
   ObjectDelete("Fhr_S3 Label");
   ObjectDelete("Fhr_S3 Line");
   ObjectDelete("Fhr_P Label");
   ObjectDelete("Fhr_P Line");
   ObjectDelete("Fhr_M5 Label");
   ObjectDelete("Fhr_M5 Line");
   ObjectDelete("Fhr_M4 Label");
   ObjectDelete("Fhr_M4 Line");
   ObjectDelete("Fhr_M3 Label");
   ObjectDelete("Fhr_M3 Line");
   ObjectDelete("Fhr_M2 Label");
   ObjectDelete("Fhr_M2 Line");
   ObjectDelete("Fhr_M1 Label");
   ObjectDelete("Fhr_M1 Line");
   ObjectDelete("Fhr_M0 Label");
   ObjectDelete("Fhr_M0 Line");
   ObjectDelete("D_R1 Label");
   ObjectDelete("D_R1 Line");
   ObjectDelete("D_R2 Label");
   ObjectDelete("D_R2 Line");
   ObjectDelete("D_R3 Label");
   ObjectDelete("D_R3 Line");
   ObjectDelete("D_S1 Label");
   ObjectDelete("D_S1 Line");
   ObjectDelete("D_S2 Label");
   ObjectDelete("D_S2 Line");
   ObjectDelete("D_S3 Label");
   ObjectDelete("D_S3 Line");
   ObjectDelete("D_P Label");
   ObjectDelete("D_P Line");
   ObjectDelete("D_M5 Label");
   ObjectDelete("D_M5 Line");
   ObjectDelete("D_M4 Label");
   ObjectDelete("D_M4 Line");
   ObjectDelete("D_M3 Label");
   ObjectDelete("D_M3 Line");
   ObjectDelete("D_M2 Label");
   ObjectDelete("D_M2 Line");
   ObjectDelete("D_M1 Label");
   ObjectDelete("D_M1 Line");
   ObjectDelete("D_M0 Label");
   ObjectDelete("D_M0 Line");
   ObjectDelete("W_R1 Label");
   ObjectDelete("W_R1 Line");
   ObjectDelete("W_R2 Label");
   ObjectDelete("W_R2 Line");
   ObjectDelete("W_R3 Label");
   ObjectDelete("W_R3 Line");
   ObjectDelete("W_S1 Label");
   ObjectDelete("W_S1 Line");
   ObjectDelete("W_S2 Label");
   ObjectDelete("W_S2 Line");
   ObjectDelete("W_S3 Label");
   ObjectDelete("W_S3 Line");
   ObjectDelete("W_P Label");
   ObjectDelete("W_P Line");
   ObjectDelete("W_M5 Label");
   ObjectDelete("W_M5 Line");
   ObjectDelete("W_M4 Label");
   ObjectDelete("W_M4 Line");
   ObjectDelete("W_M3 Label");
   ObjectDelete("W_M3 Line");
   ObjectDelete("W_M2 Label");
   ObjectDelete("W_M2 Line");
   ObjectDelete("W_M1 Label");
   ObjectDelete("W_M1 Line");
   ObjectDelete("W_M0 Label");
   ObjectDelete("W_M0 Line");
   ObjectDelete("M_R1 Label");
   ObjectDelete("M_R1 Line");
   ObjectDelete("M_R2 Label");
   ObjectDelete("M_R2 Line");
   ObjectDelete("M_R3 Label");
   ObjectDelete("M_R3 Line");
   ObjectDelete("M_S1 Label");
   ObjectDelete("M_S1 Line");
   ObjectDelete("M_S2 Label");
   ObjectDelete("M_S2 Line");
   ObjectDelete("M_S3 Label");
   ObjectDelete("M_S3 Line");
   ObjectDelete("M_P Label");
   ObjectDelete("M_P Line");
   ObjectDelete("M_M5 Label");
   ObjectDelete("M_M5 Line");
   ObjectDelete("M_M4 Label");
   ObjectDelete("M_M4 Line");
   ObjectDelete("M_M3 Label");
   ObjectDelete("M_M3 Line");
   ObjectDelete("M_M2 Label");
   ObjectDelete("M_M2 Line");
   ObjectDelete("M_M1 Label");
   ObjectDelete("M_M1 Line");
   ObjectDelete("M_M0 Label");
   ObjectDelete("M_M0 Line");
   return (0);
}

int start() {
   ArrayCopyRates(gda_308, Symbol(), PERIOD_H4);
   gd_140 = gda_308[1][4];
   gd_unused_124 = gda_308[1][1];
   gd_unused_148 = gda_308[0][1];
   gd_116 = gda_308[1][3];
   gd_132 = gda_308[1][2];
   gd_100 = gda_308[0][3];
   gd_108 = gda_308[0][2];
   gd_300 = gd_100 - gd_108;
   gd_180 = gd_116 - gd_132;
   g_price_172 = (gd_116 + gd_132 + gd_140) / 3.0;
   g_price_188 = 2.0 * g_price_172 - gd_132;
   g_price_260 = 2.0 * g_price_172 - gd_116;
   g_price_196 = g_price_172 + (gd_116 - gd_132);
   g_price_268 = g_price_172 - (gd_116 - gd_132);
   g_price_204 = 2.0 * g_price_172 + (gd_116 - 2.0 * gd_132);
   g_price_252 = (g_price_196 + g_price_204) / 2.0;
   g_price_244 = (g_price_188 + g_price_196) / 2.0;
   g_price_236 = (g_price_172 + g_price_188) / 2.0;
   g_price_228 = (g_price_172 + g_price_260) / 2.0;
   g_price_220 = (g_price_260 + g_price_268) / 2.0;
   g_price_276 = 2.0 * g_price_172 - (2.0 * gd_116 - gd_132);
   g_price_212 = (g_price_268 + g_price_276) / 2.0;
   if (gd_180 > 5.0) gd_284 = gd_180;
   else gd_284 = 10000.0 * gd_180;
   if (gd_300 > 5.0) gd_292 = gd_300;
   else gd_292 = 10000.0 * gd_300;
   ArrayCopyRates(gda_524, Symbol(), PERIOD_D1);
   gd_356 = gda_524[1][4];
   gd_unused_340 = gda_524[1][1];
   gd_unused_364 = gda_524[0][1];
   gd_332 = gda_524[1][3];
   gd_348 = gda_524[1][2];
   gd_316 = gda_524[0][3];
   gd_324 = gda_524[0][2];
   gd_516 = gd_316 - gd_324;
   gd_396 = gd_332 - gd_348;
   g_price_388 = (gd_332 + gd_348 + gd_356) / 3.0;
   g_price_404 = 2.0 * g_price_388 - gd_348;
   g_price_476 = 2.0 * g_price_388 - gd_332;
   g_price_412 = g_price_388 + (gd_332 - gd_348);
   g_price_484 = g_price_388 - (gd_332 - gd_348);
   g_price_420 = 2.0 * g_price_388 + (gd_332 - 2.0 * gd_348);
   g_price_468 = (g_price_412 + g_price_420) / 2.0;
   g_price_460 = (g_price_404 + g_price_412) / 2.0;
   g_price_452 = (g_price_388 + g_price_404) / 2.0;
   g_price_444 = (g_price_388 + g_price_476) / 2.0;
   g_price_436 = (g_price_476 + g_price_484) / 2.0;
   g_price_492 = 2.0 * g_price_388 - (2.0 * gd_332 - gd_348);
   g_price_428 = (g_price_484 + g_price_492) / 2.0;
   if (gd_396 > 5.0) gd_500 = gd_396;
   else gd_500 = 10000.0 * gd_396;
   if (gd_516 > 5.0) gd_508 = gd_516;
   else gd_508 = 10000.0 * gd_516;
   ArrayCopyRates(gda_740, Symbol(), PERIOD_W1);
   gd_572 = gda_740[1][4];
   gd_unused_556 = gda_740[1][1];
   gd_unused_580 = gda_740[0][1];
   gd_548 = gda_740[1][3];
   gd_564 = gda_740[1][2];
   gd_532 = gda_740[0][3];
   gd_540 = gda_740[0][2];
   gd_732 = gd_532 - gd_540;
   gd_612 = gd_548 - gd_564;
   g_price_604 = (gd_548 + gd_564 + gd_572) / 3.0;
   g_price_620 = 2.0 * g_price_604 - gd_564;
   g_price_692 = 2.0 * g_price_604 - gd_548;
   g_price_628 = g_price_604 + (gd_548 - gd_564);
   g_price_700 = g_price_604 - (gd_548 - gd_564);
   g_price_636 = 2.0 * g_price_604 + (gd_548 - 2.0 * gd_564);
   g_price_684 = (g_price_628 + g_price_636) / 2.0;
   g_price_676 = (g_price_620 + g_price_628) / 2.0;
   g_price_668 = (g_price_604 + g_price_620) / 2.0;
   g_price_660 = (g_price_604 + g_price_692) / 2.0;
   g_price_652 = (g_price_692 + g_price_700) / 2.0;
   g_price_708 = 2.0 * g_price_604 - (2.0 * gd_548 - gd_564);
   g_price_644 = (g_price_700 + g_price_708) / 2.0;
   if (gd_612 > 5.0) gd_716 = gd_612;
   else gd_716 = 10000.0 * gd_612;
   if (gd_732 > 5.0) gd_724 = gd_732;
   else gd_724 = 10000.0 * gd_732;
   ArrayCopyRates(gda_956, Symbol(), PERIOD_MN1);
   gd_788 = gda_956[1][4];
   gd_unused_772 = gda_956[1][1];
   gd_unused_796 = gda_956[0][1];
   gd_764 = gda_956[1][3];
   gd_780 = gda_956[1][2];
   gd_748 = gda_956[0][3];
   gd_756 = gda_956[0][2];
   gd_948 = gd_748 - gd_756;
   gd_828 = gd_764 - gd_780;
   g_price_820 = (gd_764 + gd_780 + gd_788) / 3.0;
   g_price_836 = 2.0 * g_price_820 - gd_780;
   g_price_908 = 2.0 * g_price_820 - gd_764;
   g_price_844 = g_price_820 + (gd_764 - gd_780);
   g_price_916 = g_price_820 - (gd_764 - gd_780);
   g_price_852 = 2.0 * g_price_820 + (gd_764 - 2.0 * gd_780);
   g_price_900 = (g_price_844 + g_price_852) / 2.0;
   g_price_892 = (g_price_836 + g_price_844) / 2.0;
   g_price_884 = (g_price_820 + g_price_836) / 2.0;
   g_price_876 = (g_price_820 + g_price_908) / 2.0;
   g_price_868 = (g_price_908 + g_price_916) / 2.0;
   g_price_924 = 2.0 * g_price_820 - (2.0 * gd_764 - gd_780);
   g_price_860 = (g_price_916 + g_price_924) / 2.0;
   if (gd_828 > 5.0) gd_932 = gd_828;
   else gd_932 = 10000.0 * gd_828;
   if (gd_948 > 5.0) gd_940 = gd_948;
   else gd_940 = 10000.0 * gd_948;
   if (Fhr == TRUE) {
      if (ObjectFind("Fhr_R1 label") != 0) {
         ObjectCreate("Fhr_R1 label", OBJ_TEXT, 0, Time[0], g_price_188);
         ObjectSetText("Fhr_R1 label", "Fhr_R1 " + DoubleToStr(g_price_188, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_R1 label", 0, Time[0], g_price_188);
      if (ObjectFind("Fhr_R2 label") != 0) {
         ObjectCreate("Fhr_R2 label", OBJ_TEXT, 0, Time[20], g_price_196);
         ObjectSetText("Fhr_R2 label", "Fhr_R2 " + DoubleToStr(g_price_196, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_R2 label", 0, Time[0], g_price_196);
      if (ObjectFind("Fhr_R3 label") != 0) {
         ObjectCreate("Fhr_R3 label", OBJ_TEXT, 0, Time[20], g_price_204);
         ObjectSetText("Fhr_R3 label", "Fhr_R3 " + DoubleToStr(g_price_204, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_R3 label", 0, Time[0], g_price_204);
      if (ObjectFind("Fhr_P label") != 0) {
         ObjectCreate("Fhr_P label", OBJ_TEXT, 0, Time[0], g_price_172);
         ObjectSetText("Fhr_P label", "Fhr_Pivot " + DoubleToStr(g_price_172, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_P label", 0, Time[0], g_price_172);
      if (ObjectFind("Fhr_S1 label") != 0) {
         ObjectCreate("Fhr_S1 label", OBJ_TEXT, 0, Time[0], g_price_260);
         ObjectSetText("Fhr_S1 label", "Fhr_S1 " + DoubleToStr(g_price_260, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_S1 label", 0, Time[0], g_price_260);
      if (ObjectFind("Fhr_S2 label") != 0) {
         ObjectCreate("Fhr_S2 label", OBJ_TEXT, 0, Time[20], g_price_268);
         ObjectSetText("Fhr_S2 label", "Fhr_S2 " + DoubleToStr(g_price_268, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_S2 label", 0, Time[0], g_price_268);
      if (ObjectFind("Fhr_S3 label") != 0) {
         ObjectCreate("Fhr_S3 label", OBJ_TEXT, 0, Time[20], g_price_276);
         ObjectSetText("Fhr_S3 label", "Fhr_S3 " + DoubleToStr(g_price_276, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_S3 label", 0, Time[0], g_price_276);
      if (ObjectFind("Fhr_S1 line") != 0) {
         ObjectCreate("Fhr_S1 line", OBJ_HLINE, 0, Time[0], g_price_260);
         ObjectSet("Fhr_S1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_S1 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_S1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("Fhr_S1 line", 0, Time[40], g_price_260);
      if (ObjectFind("Fhr_S2 line") != 0) {
         ObjectCreate("Fhr_S2 line", OBJ_HLINE, 0, Time[40], g_price_268, Time[0], g_price_268);
         ObjectSet("Fhr_S2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_S2 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_S2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("Fhr_S2 line", 0, Time[40], g_price_268);
      if (ObjectFind("Fhr_S3 line") != 0) {
         ObjectCreate("Fhr_S3 line", OBJ_HLINE, 0, Time[40], g_price_276, Time[0], g_price_276);
         ObjectSet("Fhr_S3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_S3 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_S3 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("Fhr_S3 line", 0, Time[40], g_price_276);
      if (ObjectFind("Fhr_P line") != 0) {
         ObjectCreate("Fhr_P line", OBJ_HLINE, 0, Time[40], g_price_172, Time[0], g_price_172);
         ObjectSet("Fhr_P line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_P line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_P line", OBJPROP_COLOR, LightBlue);
      } else ObjectMove("Fhr_P line", 0, Time[40], g_price_172);
      if (ObjectFind("Fhr_R1 line") != 0) {
         ObjectCreate("Fhr_R1 line", OBJ_HLINE, 0, Time[40], g_price_188, Time[0], g_price_188);
         ObjectSet("Fhr_R1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_R1 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_R1 line", OBJPROP_COLOR, Red);
      } else ObjectMove("Fhr_R1 line", 0, Time[40], g_price_188);
      if (ObjectFind("Fhr_R2 line") != 0) {
         ObjectCreate("Fhr_R2 line", OBJ_HLINE, 0, Time[0], g_price_196);
         ObjectSet("Fhr_R2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_R2 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_R2 line", OBJPROP_COLOR, Red);
      } else ObjectMove("Fhr_R2 line", 0, Time[40], g_price_196);
      if (ObjectFind("Fhr_R3 line") != 0) {
         ObjectCreate("Fhr_R3 line", OBJ_HLINE, 0, Time[40], g_price_204, Time[0], g_price_204);
         ObjectSet("Fhr_R3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_R3 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_R3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("Fhr_R3 line", 0, Time[40], g_price_204);
   }
   if (Fhr == TRUE && midpivots == TRUE) {
      if (ObjectFind("Fhr_M5 label") != 0) {
         ObjectCreate("Fhr_M5 label", OBJ_TEXT, 0, Time[20], g_price_252);
         ObjectSetText("Fhr_M5 label", " Fhr_M5 " + DoubleToStr(g_price_252, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_M5 label", 0, Time[0], g_price_252);
      if (ObjectFind("Fhr_M4 label") != 0) {
         ObjectCreate("Fhr_M4 label", OBJ_TEXT, 0, Time[20], g_price_244);
         ObjectSetText("Fhr_M4 label", "Fhr_M4 " + DoubleToStr(g_price_244, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_M4 label", 0, Time[0], g_price_244);
      if (ObjectFind("Fhr_M3 label") != 0) {
         ObjectCreate("Fhr_M3 label", OBJ_TEXT, 0, Time[20], g_price_236);
         ObjectSetText("Fhr_M3 label", "Fhr_M3 " + DoubleToStr(g_price_236, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_M3 label", 0, Time[0], g_price_236);
      if (ObjectFind("Fhr_M2 label") != 0) {
         ObjectCreate("Fhr_M2 label", OBJ_TEXT, 0, Time[20], g_price_228);
         ObjectSetText("Fhr_M2 label", "Fhr_M2 " + DoubleToStr(g_price_228, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_M2 label", 0, Time[0], g_price_228);
      if (ObjectFind("Fhr_M1 label") != 0) {
         ObjectCreate("Fhr_M1 label", OBJ_TEXT, 0, Time[20], g_price_220);
         ObjectSetText("Fhr_M1 label", "Fhr_M1 " + DoubleToStr(g_price_220, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_M1 label", 0, Time[0], g_price_220);
      if (ObjectFind("Fhr_M0 label") != 0) {
         ObjectCreate("Fhr_M0 label", OBJ_TEXT, 0, Time[20], g_price_212);
         ObjectSetText("Fhr_M0 label", "Fhr_M0 " + DoubleToStr(g_price_212, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("Fhr_M0 label", 0, Time[0], g_price_212);
      if (ObjectFind("Fhr_M5 line") != 0) {
         ObjectCreate("Fhr_M5 line", OBJ_HLINE, 0, Time[0], g_price_252, Time[0], g_price_252);
         ObjectSet("Fhr_M5 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_M5 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_M5 line", OBJPROP_COLOR, Red);
      } else ObjectMove("Fhr_M5 line", 0, Time[40], g_price_252);
      if (ObjectFind("Fhr_M4 line") != 0) {
         ObjectCreate("Fhr_M4 line", OBJ_HLINE, 0, Time[40], g_price_244, Time[0], g_price_244);
         ObjectSet("Fhr_M4 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_M4 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_M4 line", OBJPROP_COLOR, Red);
      } else ObjectMove("Fhr_M4 line", 0, Time[40], g_price_244);
      if (ObjectFind("Fhr_M3 line") != 0) {
         ObjectCreate("Fhr_M3 line", OBJ_HLINE, 0, Time[0], g_price_236, Time[0], g_price_236);
         ObjectSet("Fhr_M3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_M3 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_M3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("Fhr_M3 line", 0, Time[40], g_price_236);
      if (ObjectFind("Fhr_M2 line") != 0) {
         ObjectCreate("Fhr_M2 line", OBJ_HLINE, 0, Time[40], g_price_228);
         ObjectSet("Fhr_M2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_M2 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_M2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("Fhr_M2 line", 0, Time[40], g_price_228);
      if (ObjectFind("Fhr_M1 line") != 0) {
         ObjectCreate("Fhr_M1 line", OBJ_HLINE, 0, Time[40], g_price_220);
         ObjectSet("Fhr_M1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_M1 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_M1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("Fhr_M1 line", 0, Time[40], g_price_220);
      if (ObjectFind("Fhr_M0 line") != 0) {
         ObjectCreate("Fhr_M0 line", OBJ_HLINE, 0, Time[40], g_price_212);
         ObjectSet("Fhr_M0 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("Fhr_M0 line", OBJPROP_WIDTH, 1);
         ObjectSet("Fhr_M0 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("Fhr_M0 line", 0, Time[40], g_price_212);
   }
   if (daily == TRUE) {
      if (ObjectFind("D_R1 label") != 0) {
         ObjectCreate("D_R1 label", OBJ_TEXT, 0, Time[20], g_price_404);
         ObjectSetText("D_R1 label", "                              D_R1 " + DoubleToStr(g_price_404, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("     D_R1 label", 0, Time[0], g_price_404);
      if (ObjectFind("D_R2 label") != 0) {
         ObjectCreate("D_R2 label", OBJ_TEXT, 0, Time[20], g_price_412);
         ObjectSetText("D_R2 label", "                              D_R2 " + DoubleToStr(g_price_412, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_R2 label", 0, Time[0], g_price_412);
      if (ObjectFind("D_R3 label") != 0) {
         ObjectCreate("D_R3 label", OBJ_TEXT, 0, Time[20], g_price_420);
         ObjectSetText("D_R3 label", "                              D_R3 " + DoubleToStr(g_price_420, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_R3 label", 0, Time[0], g_price_420);
      if (ObjectFind("D_P label") != 0) {
         ObjectCreate("D_P label", OBJ_TEXT, 0, Time[0], g_price_388);
         ObjectSetText("D_P label", "                               D_Pivot " + DoubleToStr(g_price_388, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_P label", 0, Time[0], g_price_388);
      if (ObjectFind("D_S1 label") != 0) {
         ObjectCreate("D_S1 label", OBJ_TEXT, 0, Time[0], g_price_476);
         ObjectSetText("D_S1 label", "                              D_S1 " + DoubleToStr(g_price_476, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_S1 label", 0, Time[0], g_price_476);
      if (ObjectFind("D_S2 label") != 0) {
         ObjectCreate("D_S2 label", OBJ_TEXT, 0, Time[20], g_price_484);
         ObjectSetText("D_S2 label", "                              D_S2 " + DoubleToStr(g_price_484, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_S2 label", 0, Time[0], g_price_484);
      if (ObjectFind("D_S3 label") != 0) {
         ObjectCreate("D_S3 label", OBJ_TEXT, 0, Time[20], g_price_492);
         ObjectSetText("D_S3 label", "                              D_S3 " + DoubleToStr(g_price_492, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_S3 label", 0, Time[0], g_price_492);
      if (ObjectFind("D_S1 line") != 0) {
         ObjectCreate("D_S1 line", OBJ_HLINE, 0, Time[0], g_price_476, Time[0], g_price_476);
         ObjectSet("D_S1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_S1 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_S1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("D_S1 line", 0, Time[40], g_price_476);
      if (ObjectFind("D_S2 line") != 0) {
         ObjectCreate("D_S2 line", OBJ_HLINE, 0, Time[40], g_price_484);
         ObjectSet("D_S2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_S2 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_S2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("D_S2 line", 0, Time[40], g_price_484);
      if (ObjectFind("D_S3 line") != 0) {
         ObjectCreate("D_S3 line", OBJ_HLINE, 0, Time[40], g_price_492);
         ObjectSet("D_S3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_S3 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_S3 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("D_S3 line", 0, Time[40], g_price_492);
      if (ObjectFind("D_P line") != 0) {
         ObjectCreate("D_P line", OBJ_HLINE, 0, Time[40], g_price_388);
         ObjectSet("D_P line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_P line", OBJPROP_WIDTH, 1);
         ObjectSet("D_P line", OBJPROP_COLOR, LightBlue);
      } else ObjectMove("D_P line", 0, Time[40], g_price_388);
      if (ObjectFind("D_R1 line") != 0) {
         ObjectCreate("D_R1 line", OBJ_HLINE, 0, Time[40], g_price_404);
         ObjectSet("D_R1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_R1 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_R1 line", OBJPROP_COLOR, Red);
      } else ObjectMove("D_R1 line", 0, Time[40], g_price_404);
      if (ObjectFind("D_R2 line") != 0) {
         ObjectCreate("D_R2 line", OBJ_HLINE, 0, Time[40], g_price_412);
         ObjectSet("D_R2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_R2 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_R2 line", OBJPROP_COLOR, Red);
      } else ObjectMove("D_R2 line", 0, Time[40], g_price_412);
      if (ObjectFind("D_R3 line") != 0) {
         ObjectCreate("D_R3 line", OBJ_HLINE, 0, Time[40], g_price_420);
         ObjectSet("D_R3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_R3 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_R3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("D_R3 line", 0, Time[40], g_price_420);
   }
   if (daily == TRUE && midpivots == TRUE) {
      if (ObjectFind("D_M5 label") != 0) {
         ObjectCreate("D_M5 label", OBJ_TEXT, 0, Time[20], g_price_468);
         ObjectSetText("D_M5 label", "                              D_M5 " + DoubleToStr(g_price_468, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_M5 label", 0, Time[0], g_price_468);
      if (ObjectFind("D_M4 label") != 0) {
         ObjectCreate("D_M4 label", OBJ_TEXT, 0, Time[20], g_price_460);
         ObjectSetText("D_M4 label", "                              D_M4 " + DoubleToStr(g_price_460, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_M4 label", 0, Time[0], g_price_460);
      if (ObjectFind("D_M3 label") != 0) {
         ObjectCreate("D_M3 label", OBJ_TEXT, 0, Time[20], g_price_452);
         ObjectSetText("D_M3 label", "                              D_M3 " + DoubleToStr(g_price_452, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_M3 label", 0, Time[0], g_price_452);
      if (ObjectFind("D_M2 label") != 0) {
         ObjectCreate("D_M2 label", OBJ_TEXT, 0, Time[20], g_price_444);
         ObjectSetText("D_M2 label", "                              D_M2 " + DoubleToStr(g_price_444, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_M2 label", 0, Time[0], g_price_444);
      if (ObjectFind("D_M1 label") != 0) {
         ObjectCreate("D_M1 label", OBJ_TEXT, 0, Time[20], g_price_436);
         ObjectSetText("D_M1 label", "                              D_M1 " + DoubleToStr(g_price_436, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_M1 label", 0, Time[0], g_price_436);
      if (ObjectFind("D_M0 label") != 0) {
         ObjectCreate("D_M0 label", OBJ_TEXT, 0, Time[20], g_price_428);
         ObjectSetText("D_M0 label", "                              D_M0 " + DoubleToStr(g_price_428, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("D_M0 label", 0, Time[0], g_price_428);
      if (ObjectFind("D_M5 line") != 0) {
         ObjectCreate("D_M5 line", OBJ_HLINE, 0, Time[40], g_price_468);
         ObjectSet("D_M5 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_M5 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_M5 line", OBJPROP_COLOR, Red);
      } else ObjectMove("D_M5 line", 0, Time[40], g_price_468);
      if (ObjectFind("D_M4 line") != 0) {
         ObjectCreate("D_M4 line", OBJ_HLINE, 0, Time[40], g_price_460);
         ObjectSet("D_M4 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_M4 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_M4 line", OBJPROP_COLOR, Red);
      } else ObjectMove("D_M4 line", 0, Time[40], g_price_460);
      if (ObjectFind("D_M3 line") != 0) {
         ObjectCreate("D_M3 line", OBJ_HLINE, 0, Time[40], g_price_452);
         ObjectSet("D_M3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_M3 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_M3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("D_M3 line", 0, Time[40], g_price_452);
      if (ObjectFind("D_M2 line") != 0) {
         ObjectCreate("D_M2 line", OBJ_HLINE, 0, Time[40], g_price_444);
         ObjectSet("D_M2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_M2 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_M2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("D_M2 line", 0, Time[40], g_price_444);
      if (ObjectFind("D_M1 line") != 0) {
         ObjectCreate("D_M1 line", OBJ_HLINE, 0, Time[40], g_price_436);
         ObjectSet("D_M1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_M1 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_M1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("D_M1 line", 0, Time[40], g_price_436);
      if (ObjectFind("D_M0 line") != 0) {
         ObjectCreate("D_M0 line", OBJ_HLINE, 0, Time[40], g_price_428);
         ObjectSet("D_M0 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("D_M0 line", OBJPROP_WIDTH, 1);
         ObjectSet("D_M0 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("D_M0 line", 0, Time[40], g_price_428);
   }
   if (weekly == TRUE) {
      if (ObjectFind("W_R1 label") != 0) {
         ObjectCreate("W_R1 label", OBJ_TEXT, 0, Time[0], g_price_620);
         ObjectSetText("W_R1 label", "W_R1 " + DoubleToStr(g_price_620, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_R1 label", 0, Time[0], g_price_620);
      if (ObjectFind("W_R2 label") != 0) {
         ObjectCreate("W_R2 label", OBJ_TEXT, 0, Time[20], g_price_628);
         ObjectSetText("W_R2 label", "W_R2 " + DoubleToStr(g_price_628, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_R2 label", 0, Time[0], g_price_628);
      if (ObjectFind("W_R3 label") != 0) {
         ObjectCreate("W_R3 label", OBJ_TEXT, 0, Time[20], g_price_636);
         ObjectSetText("W_R3 label", "W_R3 " + DoubleToStr(g_price_636, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_R3 label", 0, Time[0], g_price_636);
      if (ObjectFind("W_P label") != 0) {
         ObjectCreate("W_P label", OBJ_TEXT, 0, Time[0], g_price_604);
         ObjectSetText("W_P label", "W_Pivot " + DoubleToStr(g_price_604, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_P label", 0, Time[0], g_price_604);
      if (ObjectFind("W_S1 label") != 0) {
         ObjectCreate("W_S1 label", OBJ_TEXT, 0, Time[0], g_price_692);
         ObjectSetText("W_S1 label", "W_S1 " + DoubleToStr(g_price_692, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_S1 label", 0, Time[0], g_price_692);
      if (ObjectFind("W_S2 label") != 0) {
         ObjectCreate("W_S2 label", OBJ_TEXT, 0, Time[20], g_price_700);
         ObjectSetText("W_S2 label", "W_S2 " + DoubleToStr(g_price_700, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_S2 label", 0, Time[0], g_price_700);
      if (ObjectFind("W_S3 label") != 0) {
         ObjectCreate("W_S3 label", OBJ_TEXT, 0, Time[20], g_price_708);
         ObjectSetText("W_S3 label", "W_S3 " + DoubleToStr(g_price_708, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_S3 label", 0, Time[0], g_price_708);
      if (ObjectFind("W_S1 line") != 0) {
         ObjectCreate("W_S1 line", OBJ_HLINE, 0, Time[40], g_price_692);
         ObjectSet("W_S1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_S1 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_S1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("W_S1 line", 0, Time[40], g_price_692);
      if (ObjectFind("W_S2 line") != 0) {
         ObjectCreate("W_S2 line", OBJ_HLINE, 0, Time[40], g_price_700);
         ObjectSet("W_S2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_S2 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_S2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("W_S2 line", 0, Time[40], g_price_700);
      if (ObjectFind("W_S3 line") != 0) {
         ObjectCreate("W_S3 line", OBJ_HLINE, 0, Time[40], g_price_708);
         ObjectSet("W_S3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_S3 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_S3 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("W_S3 line", 0, Time[40], g_price_708);
      if (ObjectFind("W_P line") != 0) {
         ObjectCreate("W_P line", OBJ_HLINE, 0, Time[40], g_price_604);
         ObjectSet("W_P line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_P line", OBJPROP_WIDTH, 1);
         ObjectSet("W_P line", OBJPROP_COLOR, LightBlue);
      } else ObjectMove("W_P line", 0, Time[40], g_price_604);
      if (ObjectFind("W_R1 line") != 0) {
         ObjectCreate("W_R1 line", OBJ_HLINE, 0, Time[40], g_price_620);
         ObjectSet("W_R1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_R1 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_R1 line", OBJPROP_COLOR, Red);
      } else ObjectMove("W_R1 line", 0, Time[40], g_price_620);
      if (ObjectFind("W_R2 line") != 0) {
         ObjectCreate("W_R2 line", OBJ_HLINE, 0, Time[40], g_price_628);
         ObjectSet("W_R2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_R2 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_R2 line", OBJPROP_COLOR, Red);
      } else ObjectMove("W_R2 line", 0, Time[40], g_price_628);
      if (ObjectFind("W_R3 line") != 0) {
         ObjectCreate("W_R3 line", OBJ_HLINE, 0, Time[40], g_price_636);
         ObjectSet("W_R3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_R3 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_R3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("W_R3 line", 0, Time[40], g_price_636);
   }
   if (weekly == TRUE && midpivots == TRUE) {
      if (ObjectFind("W_M5 label") != 0) {
         ObjectCreate("W_M5 label", OBJ_TEXT, 0, Time[20], g_price_684);
         ObjectSetText("W_M5 label", "W_M5 " + DoubleToStr(g_price_684, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_M5 label", 0, Time[0], g_price_684);
      if (ObjectFind("W_M4 label") != 0) {
         ObjectCreate("W_M4 label", OBJ_TEXT, 0, Time[20], g_price_676);
         ObjectSetText("W_M4 label", "W_M4 " + DoubleToStr(g_price_676, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_M4 label", 0, Time[0], g_price_676);
      if (ObjectFind("W_M3 label") != 0) {
         ObjectCreate("W_M3 label", OBJ_TEXT, 0, Time[20], g_price_668);
         ObjectSetText("W_M3 label", "W_M3 " + DoubleToStr(g_price_668, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_M3 label", 0, Time[0], g_price_668);
      if (ObjectFind("W_M2 label") != 0) {
         ObjectCreate("W_M2 label", OBJ_TEXT, 0, Time[20], g_price_660);
         ObjectSetText("W_M2 label", "W_M2 " + DoubleToStr(g_price_660, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_M2 label", 0, Time[0], g_price_660);
      if (ObjectFind("W_M1 label") != 0) {
         ObjectCreate("W_M1 label", OBJ_TEXT, 0, Time[20], g_price_652);
         ObjectSetText("W_M1 label", "W_M1 " + DoubleToStr(g_price_652, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_M1 label", 0, Time[0], g_price_652);
      if (ObjectFind("W_M0 label") != 0) {
         ObjectCreate("W_M0 label", OBJ_TEXT, 0, Time[20], g_price_644);
         ObjectSetText("W_M0 label", "W_M0 " + DoubleToStr(g_price_644, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("W_M0 label", 0, Time[0], g_price_644);
      if (ObjectFind("W_M5 line") != 0) {
         ObjectCreate("W_M5 line", OBJ_HLINE, 0, Time[40], g_price_684);
         ObjectSet("W_M5 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_M5 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_M5 line", OBJPROP_COLOR, Red);
      } else ObjectMove("W_M5 line", 0, Time[40], g_price_684);
      if (ObjectFind("W_M4 line") != 0) {
         ObjectCreate("W_M4 line", OBJ_HLINE, 0, Time[40], g_price_676);
         ObjectSet("W_M4 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_M4 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_M4 line", OBJPROP_COLOR, Red);
      } else ObjectMove("W_M4 line", 0, Time[40], g_price_676);
      if (ObjectFind("W_M3 line") != 0) {
         ObjectCreate("W_M3 line", OBJ_HLINE, 0, Time[40], g_price_668);
         ObjectSet("W_M3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_M3 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_M3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("W_M3 line", 0, Time[40], g_price_668);
      if (ObjectFind("W_M2 line") != 0) {
         ObjectCreate("W_M2 line", OBJ_HLINE, 0, Time[40], g_price_660);
         ObjectSet("W_M2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_M2 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_M2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("W_M2 line", 0, Time[40], g_price_660);
      if (ObjectFind("W_M1 line") != 0) {
         ObjectCreate("W_M1 line", OBJ_HLINE, 0, Time[40], g_price_652);
         ObjectSet("W_M1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_M1 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_M1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("W_M1 line", 0, Time[40], g_price_652);
      if (ObjectFind("W_M0 line") != 0) {
         ObjectCreate("W_M0 line", OBJ_HLINE, 0, Time[40], g_price_644);
         ObjectSet("W_M0 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("W_M0 line", OBJPROP_WIDTH, 1);
         ObjectSet("W_M0 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("W_M0 line", 0, Time[40], g_price_644);
   }
   if (monthly == TRUE) {
      if (ObjectFind("M_R1 label") != 0) {
         ObjectCreate("M_R1 label", OBJ_TEXT, 0, Time[0], g_price_836);
         ObjectSetText("M_R1 label", " M_R1 " + DoubleToStr(g_price_836, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_R1 label", 0, Time[0], g_price_836);
      if (ObjectFind("M_R2 label") != 0) {
         ObjectCreate("M_R2 label", OBJ_TEXT, 0, Time[20], g_price_844);
         ObjectSetText("M_R2 label", " M_R2 " + DoubleToStr(g_price_844, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_R2 label", 0, Time[0], g_price_844);
      if (ObjectFind("M_R3 label") != 0) {
         ObjectCreate("M_R3 label", OBJ_TEXT, 0, Time[20], g_price_852);
         ObjectSetText("M_R3 label", " M_R3 " + DoubleToStr(g_price_852, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_R3 label", 0, Time[0], g_price_852);
      if (ObjectFind("M_P label") != 0) {
         ObjectCreate("M_P label", OBJ_TEXT, 0, Time[0], g_price_820);
         ObjectSetText("M_P label", "M_Pivot " + DoubleToStr(g_price_820, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_P label", 0, Time[0], g_price_820);
      if (ObjectFind("M_S1 label") != 0) {
         ObjectCreate("M_S1 label", OBJ_TEXT, 0, Time[0], g_price_908);
         ObjectSetText("M_S1 label", "M_S1 " + DoubleToStr(g_price_908, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_S1 label", 0, Time[0], g_price_908);
      if (ObjectFind("M_S2 label") != 0) {
         ObjectCreate("M_S2 label", OBJ_TEXT, 0, Time[20], g_price_916);
         ObjectSetText("M_S2 label", "S2 " + DoubleToStr(g_price_916, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_S2 label", 0, Time[0], g_price_916);
      if (ObjectFind("M_S3 label") != 0) {
         ObjectCreate("M_S3 label", OBJ_TEXT, 0, Time[20], g_price_924);
         ObjectSetText("M_S3 label", "M_S3 " + DoubleToStr(g_price_924, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_S3 label", 0, Time[0], g_price_924);
      if (ObjectFind("M_S1 line") != 0) {
         ObjectCreate("M_S1 line", OBJ_HLINE, 0, Time[40], g_price_908);
         ObjectSet("M_S1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_S1 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_S1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("M_S1 line", 0, Time[40], g_price_908);
      if (ObjectFind("M_S2 line") != 0) {
         ObjectCreate("M_S2 line", OBJ_HLINE, 0, Time[40], g_price_916);
         ObjectSet("M_S2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_S2 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_S2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("M_S2 line", 0, Time[40], g_price_916);
      if (ObjectFind("M_S3 line") != 0) {
         ObjectCreate("M_S3 line", OBJ_HLINE, 0, Time[40], g_price_924);
         ObjectSet("M_S3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_S3 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_S3 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("M_S3 line", 0, Time[40], g_price_924);
      if (ObjectFind("M_P line") != 0) {
         ObjectCreate("M_P line", OBJ_HLINE, 0, Time[40], g_price_820);
         ObjectSet("M_P line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_P line", OBJPROP_WIDTH, 1);
         ObjectSet("M_P line", OBJPROP_COLOR, LightBlue);
      } else ObjectMove("M_P line", 0, Time[40], g_price_820);
      if (ObjectFind("M_R1 line") != 0) {
         ObjectCreate("M_R1 line", OBJ_HLINE, 0, Time[40], g_price_836);
         ObjectSet("M_R1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_R1 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_R1 line", OBJPROP_COLOR, Red);
      } else ObjectMove("M_R1 line", 0, Time[40], g_price_836);
      if (ObjectFind("M_R2 line") != 0) {
         ObjectCreate("M_R2 line", OBJ_HLINE, 0, Time[40], g_price_844);
         ObjectSet("M_R2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_R2 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_R2 line", OBJPROP_COLOR, Red);
      } else ObjectMove("M_R2 line", 0, Time[40], g_price_844);
      if (ObjectFind("M_R3 line") != 0) {
         ObjectCreate("M_R3 line", OBJ_HLINE, 0, Time[40], g_price_852);
         ObjectSet("M_R3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_R3 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_R3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("M_R3 line", 0, Time[40], g_price_852);
   }
   if (monthly == TRUE && midpivots == TRUE) {
      if (ObjectFind("M_M5 label") != 0) {
         ObjectCreate("M_M5 label", OBJ_TEXT, 0, Time[20], g_price_900);
         ObjectSetText("M_M5 label", " M_M5 " + DoubleToStr(g_price_900, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_M5 label", 0, Time[0], g_price_900);
      if (ObjectFind("M_M4 label") != 0) {
         ObjectCreate("M_M4 label", OBJ_TEXT, 0, Time[20], g_price_892);
         ObjectSetText("M_M4 label", " M_M4 " + DoubleToStr(g_price_892, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_M4 label", 0, Time[0], g_price_892);
      if (ObjectFind("M_M3 label") != 0) {
         ObjectCreate("M_M3 label", OBJ_TEXT, 0, Time[20], g_price_884);
         ObjectSetText("M_M3 label", " M_M3 " + DoubleToStr(g_price_884, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_M3 label", 0, Time[0], g_price_884);
      if (ObjectFind("M_M2 label") != 0) {
         ObjectCreate("M_M2 label", OBJ_TEXT, 0, Time[20], g_price_876);
         ObjectSetText("M_M2 label", " M_M2 " + DoubleToStr(g_price_876, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_M2 label", 0, Time[0], g_price_876);
      if (ObjectFind("M_M1 label") != 0) {
         ObjectCreate("M_M1 label", OBJ_TEXT, 0, Time[20], g_price_868);
         ObjectSetText("M_M1 label", " M_M1 " + DoubleToStr(g_price_868, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_M1 label", 0, Time[0], g_price_868);
      if (ObjectFind("M_M0 label") != 0) {
         ObjectCreate("M_M0 label", OBJ_TEXT, 0, Time[20], g_price_860);
         ObjectSetText("M_M0 label", " M_M0 " + DoubleToStr(g_price_860, 4), 8, "Arial", CLR_NONE);
      } else ObjectMove("M_M0 label", 0, Time[0], g_price_860);
      if (ObjectFind("M_M5 line") != 0) {
         ObjectCreate("M_M5 line", OBJ_HLINE, 0, Time[40], g_price_900, Time[20], g_price_900);
         ObjectSet("M_M5 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_M5 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_M5 line", OBJPROP_COLOR, Red);
      } else ObjectMove("M_M5 line", 0, Time[40], g_price_900);
      if (ObjectFind("M_M4 line") != 0) {
         ObjectCreate("M_M4 line", OBJ_HLINE, 0, Time[40], g_price_892);
         ObjectSet("M_M4 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_M4 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_M4 line", OBJPROP_COLOR, Red);
      } else ObjectMove("M_M4 line", 0, Time[40], g_price_892);
      if (ObjectFind("M_M3 line") != 0) {
         ObjectCreate("M_M3 line", OBJ_HLINE, 0, Time[40], g_price_884);
         ObjectSet("M_M3 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_M3 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_M3 line", OBJPROP_COLOR, Red);
      } else ObjectMove("M_M3 line", 0, Time[40], g_price_884);
      if (ObjectFind("M_M2 line") != 0) {
         ObjectCreate("M_M2 line", OBJ_HLINE, 0, Time[40], g_price_876);
         ObjectSet("M_M2 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_M2 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_M2 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("M_M2 line", 0, Time[40], g_price_876);
      if (ObjectFind("M_M1 line") != 0) {
         ObjectCreate("M_M1 line", OBJ_HLINE, 0, Time[40], g_price_868);
         ObjectSet("M_M1 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_M1 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_M1 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("M_M1 line", 0, Time[40], g_price_868);
      if (ObjectFind("M_M0 line") != 0) {
         ObjectCreate("M_M0 line", OBJ_HLINE, 0, Time[40], g_price_860);
         ObjectSet("M_M0 line", OBJPROP_STYLE, STYLE_SOLID);
         ObjectSet("M_M0 line", OBJPROP_WIDTH, 1);
         ObjectSet("M_M0 line", OBJPROP_COLOR, Blue);
      } else ObjectMove("M_M0 line", 0, Time[40], g_price_860);
   }
   return (0);
}

[/code]

龙听 发表于 2020-6-3 08:42

[url=http://p.qhlt.cn/file-4407.html]Fxtrend.rar[/url]

龙听小虎 发表于 2023-11-11 20:56

{:114:}

页: [1]