等级: 已到期
- 注册:
- 2022-9-1
- 曾用名:
|
//变量定义
x:=5500;
//平多
if close>5525 and holding=2 then sell(1,2,marketr);
if close>5500 and holding=3 then sell(1,1,marketr);
if close>5475 and holding=4 then sell(1,1,marketr);
if close>5450 and holding=5 then sell(1,1,MARKETR);
if close>5425 and holding=6 then sell(1,1,MARKETR);
if close>5400 and holding=7 then sell(1,1,MARKETR);
if close>5375 and holding=8 then sell(1,1,MARKETR);
if close>5350 and holding=9 then sell(1,1,MARKETR);
if close>5325 and holding=10 then sell(1,1,MARKETR);
if close>5300 and holding=11 then sell(1,1,MARKETR);
if close>5275 and holding=12 then sell(1,1,MARKETR);
if close>5250 and holding=13 then sell(1,1,MARKETR);
if close>5225 and holding=14 then sell(1,1,MARKETR);
if close>5200 and holding=16 then sell(1,2,MARKETR);
if close>5175 and holding=18 then sell(1,2,MARKETR);
if close>5150 and holding=20 then sell(1,2,MARKETR);
if close>5125 and holding=22 then sell(1,2,MARKETR);
if close>5100 and holding=24 then sell(1,2,MARKETR);
if close>5075 and holding=26 then sell(1,2,MARKETR);
if close>5050 and holding=28 then sell(1,2,MARKETR);
if close>5025 and holding=30 then sell(1,2,MARKETR);
if close>5000 and holding=32 then sell(1,2,MARKETR);
if close>4975 and holding=36 then sell(1,2,MARKETR);
if close>4950 and holding=38 then sell(1,2,MARKETR);
if close>4925 and holding=40 then sell(1,2,MARKETR);
if close>4900 and holding=42 then sell(1,2,MARKETR);
if close>4875 and holding=44 then sell(1,2,MARKETR);
if close>4850 and holding=46 then sell(1,2,MARKETR);
if close>4825 and holding=48 then sell(1,2,MARKETR);
if close>4800 and holding=50 then sell(1,2,MARKETR);
if close>4775 and holding=52 then sell(1,2,MARKETR);
if close>4750 and holding=54 then sell(1,2,MARKETR);
if close>4725 and holding=56 then sell(1,2,MARKETR);
if close>4700 and holding=58 then sell(1,2,MARKETR);
if close>4675 and holding=60 then sell(1,2,MARKETR);
if close>4650 and holding=62 then sell(1,2,MARKETR);
if close>4625 and holding=64 then sell(1,2,MARKETR);
//价格等于情况下开仓,并且只会开仓一次用holding来控制
if close=5500 and holding=0 then buy(1,2,marketr);
if close=5475 and holding=2 then buy(1,1,marketr);
if close=5450 and holding=3 then buy(1,1,marketr);
if close=5425 and holding=4 then buy(1,1,MARKETR);
if close=5400 and holding=5 then buy(1,1,MARKETR);
if close=5375 and holding=6 then buy(1,1,MARKETR);
if close=5350 and holding=7 then buy(1,1,MARKETR);
if close=5325 and holding=8 then buy(1,1,MARKETR);
if close=5300 and holding=9 then buy(1,1,MARKETR);
if close=5275 and holding=10 then buy(1,1,MARKETR);
if close=5250 and holding=11 then buy(1,1,MARKETR);
if close=5225 and holding=12 then buy(1,1,MARKETR);
if close=5200 and holding=13 then buy(1,1,MARKETR);
if close=5175 and holding=14 then buy(1,2,MARKETR);
if close=5150 and holding=16 then buy(1,2,MARKETR);
if close=5125 and holding=18 then buy(1,2,MARKETR);
if close=5100 and holding=20 then buy(1,2,MARKETR);
if close=5075 and holding=22 then buy(1,2,MARKETR);
if close=5050 and holding=24 then buy(1,2,MARKETR);
if close=5025 and holding=26 then buy(1,2,MARKETR);
if close=5000 and holding=28 then buy(1,2,MARKETR);
if close=4975 and holding=30 then buy(1,2,MARKETR);
if close=4950 and holding=32 then buy(1,2,MARKETR);
if close=4925 and holding=34 then buy(1,2,MARKETR);
if close=4900 and holding=36 then buy(1,2,MARKETR);
if close=4875 and holding=38 then buy(1,2,MARKETR);
if close=4850 and holding=40 then buy(1,2,MARKETR);
if close=4825 and holding=42 then buy(1,2,MARKETR);
if close=4800 and holding=44 then buy(1,2,MARKETR);
if close=4775 and holding=46 then buy(1,2,MARKETR);
if close=4750 and holding=48 then buy(1,2,MARKETR);
if close=4725 and holding=50 then buy(1,2,MARKETR);
if close=4700 and holding=52 then buy(1,2,MARKETR);
if close=4675 and holding=54 then buy(1,2,MARKETR);
if close=4650 and holding=56 then buy(1,2,MARKETR);
if close=4625 and holding=58 then buy(1,2,MARKETR);
if close=4600 and holding=60 then buy(1,2,MARKETR);
资产:ASSET,NOAXIS,COLORMAGENTA,PRECISION0;
|
-
|