教你写股市的指标公式 之二
涓嬮潰鍐嶉氳繃涓浜涘皬渚嬪瓙锛屾潵杩涗竴姝ョ殑璁╁ぇ瀹朵簡瑙e叕寮忥細
涓锛浠婃棩姣旀槰鏃ョ殑鎴愪氦閲忔斁澶т簡1鍊嶏細VOL/REF锛圴OL锛1锛>2锛
浜岋紝浠婃棩鐨勪簲鏃ュ潎閲忔瘮浜斿ぉ鍓嶇殑浜旀棩鍧囬噺鏀惧ぇ浜3鍊嶏細
AA锛=MA锛圴OL锛5锛夛紱
BB锛=REF锛圓A锛5锛夛紱
AA/BB锛4锛
涓夛紝浠婃棩姣旀槰鏃ョ殑鎴愪氦閲忕缉灏忎簡1鍊嶏細
VOL/REF锛圴OL锛1锛夛紲0.5锛
鍥涳紝浠婃棩娑ㄥ箙杈惧埌浜7%浠ヤ笂锛
CLOSE/REF锛圕LOSE锛1锛夛紴1.07锛
娑ㄥ仠濡備綍琛ㄧず鍛細 close/ref(close,1)>1.097 and close=high;
浜旓紝鍗佹棩鍧囦环缁х画涓婃定锛屼篃灏辨槸浠婂ぉ鐨勫崄鏃ョ嚎锛屽ぇ浜庢槰澶╃殑鍗佹棩绾匡細
AA锛=MA锛圕LOSE锛10锛夛紱
BB锛=REE锛圓A锛1锛夛紱
AA锛濨B锛
鍏紝楂樺紑楂樿蛋
AA锛=OPEN锛濺EF锛圕LOSE锛1锛夛紱{寮鐩樹环澶т簬鏄ㄦ敹}
BB锛=CLOSE锛濷PEN锛涳經褰撴棩鏀堕槼绾匡綕
AA AND BB锛
涓冿紝鍧囩嚎澶氬ご鎺掑垪锛
AA锛=MA锛圕LOSE锛5锛夛紱
BB锛=MA锛圕LOSE锛10锛夛紱
CC锛=MA锛圕LOSE锛30锛夛紱
T1锛=AA锛濨B AND BB锛濩C锛
浠ヤ笂鎯呭喌缁存寔涓娈垫椂闂达紝鍋囪鎴戜滑杩欓噷瀹氫负4澶╀互涓婏細
COUNT锛圱1锛4锛=4锛
COUNT锛圶锛孨锛夎〃绀虹粺璁″湪N澶╁唴婊¤冻鏉′欢X鐨勬湁鍑犲ぉ銆
鏈缁堢殑缁撴灉灏辨槸濡備笅鎵绀猴細
AA锛=MA锛圕LOSE锛5锛夛紱
BB锛=MA锛圕LOSE锛10锛夛紱
CC锛=MA锛圕LOSE锛30锛夛紱
T1锛=AA锛濨B AND BB锛濩C锛
COUNT锛圱1锛4 锛=4锛
鍏紝涓嬮潰鐢ㄨ储鍔℃姤琛ㄧ紪鍐欏叕寮忥紝鏂逛究浠峰兼姇璧勮呴夎偂銆
A1:=CLOSE<10; {鏀剁洏浠峰皬浜10鍏儅
A2:=FINANCE(33)/CLOSE<20; {姣忚偂鏀剁泭闄や互鏀剁洏浠蜂负甯傜泩鐜噠
A3:=CLOSE/FINANCE(34)<2; {鏀剁洏浠烽櫎浠ュ噣璧勪骇绛変簬甯傚噣鐜噠
A4:=FINANCE(40)<3000000000; {娴侀氬競鍊煎皬浜30浜縸
A5:=FINANCE(9)<50; {璧勪骇璐熷虹巼灏忎簬50%}
A6:=FINANCE(20)>1000000000; {钀ヤ笟鏀跺叆澶т簬10浜縸
A7:=FINANCE(55)>50000000; {鐮斿彂璐圭敤澶т簬5000涓噠
A8:A1 AND A2 AND A3 AND A4 AND A5 AND A6 AND A7; {鍚屾椂鎴愮珛};
鍏紡鍐欏ソ浜嗭紝濡備綍鎵捐偂鍛紵 绗竴锛屼綘寰楁湁鑲$エ杞欢銆傚缓璁敤閫氳揪淇°傛瘮濡傛捣閫氳瘉鍒搁氳揪淇°傜劧鍚庡垎鍒寜涓嬪浘鎵绀烘搷浣滐細
鍙屽嚮鏉′欢閫夎偂鍏紡锛岄夋嫨-->鍏朵粬绫诲瀷锛岄夋嫨-->鏂板缓锛屽嵆鍙墦寮鍏紡缂栬緫鍏ュ彛銆傛妸鍏紡浠g爜鍐欏湪澶х殑绌虹櫧鍖哄煙銆傚啓濂界‘瀹氬嵆鍙
缂栧啓濂藉悗锛屽浣曠敤姝ゅ叕寮忔壘涓偂鍛紝渚濇鎸変笅鍥炬彁绀烘搷浣滐細
OK锛屼粖澶╁氨鍐欏埌杩欍傚叧娉ㄦ垜锛岃繕鏈夊悗缁叕寮忔暀绋嬪垎浜粰澶у銆
鈥嬫湁鏃跺垎鏋愪釜鑲℃椂锛岃鍙傝冨ぇ鐩樼殑璧板娍锛屾瘮濡傛姉璺岋紝閫嗗娍绛夈備笅鍥惧氨鏄妸娌寚锛屽垱涓氭澘鐨勫ぇ鐩樻寚鏁帮紝璋冨埌涓偂涓嬮潰銆傛湁闇瑕佺殑鍙互鐣欒█锛屾垨绉佷俊銆
娉ㄦ剰鐪嬩笂鍥撅紝涓偂K绾匡紝璺熸勃鎸囷紝鍒涗笟鏉挎寚鏁般傚悓鍦ㄤ竴涓獥鍙c傚氨鏄敤鎸囨爣缂栧啓璋冪敤鐨勩傛湁闇瑕佺殑鍙互鐣欒█銆傚鏋滃ぇ瀹惰寰楁鏂囨湁鐢紝灏辫阿璋㈠ぇ瀹剁偣涓禐鏀寔榧撳姳涓涓嬶紒璋㈣阿銆