커뮤니티
수식문의
2013-11-30 17:43:27
141
글번호 69990
안녕하세요 친절한답변에 감사드립니다 아래식에서 당일거래중 0.8포인트 수익나거나 또는 1포인트 손실일때 바로거래중지 되게해주시고 , 또다른식은 당일50만원 수익이거나 60만원 손실일때 바로 거래정지 되게부탁드립니다 감사합니다
If stime < 150000 Then{
if stime >= 090000 then{
If MarketPosition==0 then{
buy("매수",Atstop,DayOpen+0.8);
sell("매도",Atstop,DayOpen-0.8);
}
if MarketPosition == -1 Then
buy("역매수",Atstop,lowest(low,BarsSinceEntry+1)+0.9);
if MarketPosition == 1 Then
sell("역매도",Atstop,highest(high,BarsSinceEntry+1)-0.9);
}
}
답변 1
예스스탁 예스스탁 답변
2013-12-02 13:25:29
안녕하세요
예스스탁입니다.
1.
input : loss(1.0),Profit(0.8);
Condition1 = ExitDate(1) == sdate and (IsExitName("StopLoss",1) or IsExitName("StopProfittarget",1));
If stime < 150000 and Condition1 == false Then{
if stime >= 090000 then{
If MarketPosition==0 then{
buy("매수",Atstop,DayOpen+0.8);
sell("매도",Atstop,DayOpen-0.8);
}
if MarketPosition == -1 Then
buy("역매수",Atstop,lowest(low,BarsSinceEntry+1)+0.9);
if MarketPosition == 1 Then
sell("역매도",Atstop,highest(high,BarsSinceEntry+1)-0.9);
}
}
SetStopLoss(loss,PointStop);
SetStopProfittarget(Profit,PointStop);
2.
input : loss(600000),Profit(500000);
var1 = (loss/PointValue)*PriceScale;
var2 = (Profit/PointValue)*PriceScale;
Condition1 = ExitDate(1) == sdate and (IsExitName("StopLoss",1) or IsExitName("StopProfittarget",1));
If stime < 150000 and Condition1 == false Then{
if stime >= 090000 then{
If MarketPosition==0 then{
buy("매수",Atstop,DayOpen+0.8);
sell("매도",Atstop,DayOpen-0.8);
}
if MarketPosition == -1 Then
buy("역매수",Atstop,lowest(low,BarsSinceEntry+1)+0.9);
if MarketPosition == 1 Then
sell("역매도",Atstop,highest(high,BarsSinceEntry+1)-0.9);
}
}
SetStopLoss(var1,PointStop);
SetStopProfittarget(var2,PointStop);
즐거운 하루되세요
> 민선생1 님이 쓴 글입니다.
> 제목 : 수식문의
>
안녕하세요 친절한답변에 감사드립니다 아래식에서 당일거래중 0.8포인트 수익나거나 또는 1포인트 손실일때 바로거래중지 되게해주시고 , 또다른식은 당일50만원 수익이거나 60만원 손실일때 바로 거래정지 되게부탁드립니다 감사합니다
If stime < 150000 Then{
if stime >= 090000 then{
If MarketPosition==0 then{
buy("매수",Atstop,DayOpen+0.8);
sell("매도",Atstop,DayOpen-0.8);
}
if MarketPosition == -1 Then
buy("역매수",Atstop,lowest(low,BarsSinceEntry+1)+0.9);
if MarketPosition == 1 Then
sell("역매도",Atstop,highest(high,BarsSinceEntry+1)-0.9);
}
}
다음글
이전글