|
马上注册,享用更多功能,让你轻松玩转本论坛。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
该指标主要是在主图的K线上把倍量与高量及缺口位置上画上顶底的线条,以便找出买卖点。这也是基于王子老师的倍量不穿、高量不破、缺口不补的原理。- BLZ:=V>REF(V,1)*1.9 AND C>O;
- QK:=L>REF(H,1);
- BLZZ:=BLZ OR QK;
- STICKLINE(BLZZ,CLOSE,O,1,0),COLORYELLOW;
- 倍底线:REF(O,BARSLAST(BLZZ)),COLORYELLOW,POINTDOT;
- STICKLINE(O,倍底线,倍底线,8,0),COLORYELLOW;
- 倍顶线:REF(C,BARSLAST(BLZZ)),COLORLIRED,POINTDOT;
- STICKLINE(C,倍顶线,倍顶线,8,0),COLORLIRED;
复制代码
下面再给个PHP的
- <?php
- class lx_lgsj{
- public function GetData($code){
- $msg = file_get_contents('data/'.$code.'.txt');
- $msg = rtrim($msg,"|");
- // $day_data = file_get_contents("data_tay/".$code.'.txt');
- // $msg = $msg.$day_data;
- $msg = explode("|", $msg);
- $data = array_slice($msg,-120);
- return $data;
- }
- public function blz($data){
- $data0 = explode(",",$data[0]);
- $data1 = explode(",",$data[1]);
- $v1 = $data0[5];
- $v2 = $data1[5];
- $c1 = $data0[4];
- $c2 = $data1[4];
- $o1 = $data0[1];
- $o2 = $data1[1];
- $g1 = $data0[2];
- $g2 = $data1[2];
- $d1 = $data0[3];
- $d2 = $data1[3];
- if(($v2>$v1*1.9 AND $c2>$o2) or ($d2>$g1 and $c2>$o2)){
- return $o2;
- }else{
- return 0;
- }
- }
- }
复制代码- include 'cnf/cnf.php';
- include 'class/mysql_class.php';
- include 'class/class_lgsj.php';
- $job = new mysql;
- $lx = new lx_lgsj;
- set_time_limit(0);
- ignore_user_abort(true);
- @ini_set('memory_limit', '1512M');
- $sql = $job->query("SELECT code FROM `data`");
- foreach($sql as $v){
- $code = $v['code'];
- $dat = $lx->GetData($code);
- $data = array_slice($dat,-20);
- $data19 = explode(",",$data[19]);
- $num = 0;
- $oarr = array();
- foreach($data as $kk=>$val){
- $data1 = array_slice($data,$kk,2);
- $blz = $lx->blz($data1);
- if($blz>0){
- $num++;
- $oarr[]=$blz;
- }
- }
- switch ($num) {
- case 3:
- if($oarr[2]>$oarr[1] and $oarr[1]>$oarr[0] and $data19[4]>$oarr[2]){
- echo $code.'<br>';
- }
- break;
- case 4:
- if($oarr[3]>$oarr[2] and $oarr[2]>$oarr[1] and $data19[4]>$oarr[3]){
- echo $code.'<br>';
- }
- break;
- case 5:
- if($oarr[4]>$oarr[3] and $oarr[3]>$oarr[2] and $data19[4]>$oarr[4]){
- echo $code.'<br>';
- }
- break;
- case 6:
- if($oarr[5]>$oarr[4] and $oarr[4]>$oarr[3] and $data19[4]>$oarr[5]){
- echo $code.'<br>';
- }
- break;
- }
- }
复制代码
有兴趣的一起来研究,一直在学习中,再次感谢王子老师的基础理论。
|
|