커뮤니티
수식수정부탁합니다
2014-02-06 16:35:40
149
글번호 72280
수식수정부탁합니다
주가 90일선 위에조건하구, 120일선 아래 조건을
120선>60일선 위에 있을경우 매수, 120선<60일선 아래에 있을경우 매도로 바꿔주세요
수소하세요~~^^
var1 = MACD_OSC(24,52,18);
var2 = ma(c,90);
Var3 = MACD_OSC(24,52,18);
Var4 = ma(c,120);
if c > var2 and crossup(var1,0) and stime >= 150000 and stime < 240000 Then
buy ();
if CrossDown(var1,0) Then
ExitLong();
if MarketPosition == 1 and countif(var1>var1[1] and var1 >= 0.0001,3) == 3 Then
ExitLong();
if C < Var4 and CrossDown(Var3,0) and stime >= 150000 and stime < 240000 Then
sell();
if crossup(Var3,0) Then
ExitShort();
if MarketPosition == -1 and countif(var1<var1[1] and var1 <= -0.0001,3) == 3 Then
ExitShort();
if MarketPosition == 1 and BarsSinceEntry == 1 and C > EntryPrice+PriceScale*3 Then
exitlong("bx",AtStop,EntryPrice+PriceScale*3);
if MarketPosition == -1 and BarsSinceEntry == 1 and C < EntryPrice-PriceScale*3 Then
ExitShort("sx",AtStop,EntryPrice-PriceScale*3);
SetStopLoss(PriceScale*6,PointStop);
답변 1
예스스탁 예스스탁 답변
2014-02-07 09:53:53
안녕하세요
예스스탁입니다.
var1 = MACD_OSC(24,52,18);
var2 = ma(c,90);
Var3 = MACD_OSC(24,52,18);
Var4 = ma(c,120);
var5 = ma(C,60);
if var4 > var5 and crossup(var1,0) and stime >= 150000 and stime < 240000 Then
buy ();
if CrossDown(var1,0) Then
ExitLong();
if MarketPosition == 1 and countif(var1>var1[1] and var1 >= 0.0001,3) == 3 Then
ExitLong();
if var4 < var5 and CrossDown(Var3,0) and stime >= 150000 and stime < 240000 Then
sell();
if crossup(Var3,0) Then
ExitShort();
if MarketPosition == -1 and countif(var1<var1[1] and var1 <= -0.0001,3) == 3 Then
ExitShort();
if MarketPosition == 1 and BarsSinceEntry == 1 and C > EntryPrice+PriceScale*3 Then
exitlong("bx",AtStop,EntryPrice+PriceScale*3);
if MarketPosition == -1 and BarsSinceEntry == 1 and C < EntryPrice-PriceScale*3 Then
ExitShort("sx",AtStop,EntryPrice-PriceScale*3);
SetStopLoss(PriceScale*6,PointStop);
즐거운 하루되세요
> HI_jh***** 님이 쓴 글입니다.
> 제목 : 수식수정부탁합니다
> 수식수정부탁합니다
주가 90일선 위에조건하구, 120일선 아래 조건을
120선>60일선 위에 있을경우 매수, 120선<60일선 아래에 있을경우 매도로 바꿔주세요
수소하세요~~^^
var1 = MACD_OSC(24,52,18);
var2 = ma(c,90);
Var3 = MACD_OSC(24,52,18);
Var4 = ma(c,120);
if c > var2 and crossup(var1,0) and stime >= 150000 and stime < 240000 Then
buy ();
if CrossDown(var1,0) Then
ExitLong();
if MarketPosition == 1 and countif(var1>var1[1] and var1 >= 0.0001,3) == 3 Then
ExitLong();
if C < Var4 and CrossDown(Var3,0) and stime >= 150000 and stime < 240000 Then
sell();
if crossup(Var3,0) Then
ExitShort();
if MarketPosition == -1 and countif(var1<var1[1] and var1 <= -0.0001,3) == 3 Then
ExitShort();
if MarketPosition == 1 and BarsSinceEntry == 1 and C > EntryPrice+PriceScale*3 Then
exitlong("bx",AtStop,EntryPrice+PriceScale*3);
if MarketPosition == -1 and BarsSinceEntry == 1 and C < EntryPrice-PriceScale*3 Then
ExitShort("sx",AtStop,EntryPrice-PriceScale*3);
SetStopLoss(PriceScale*6,PointStop);
다음글
이전글