var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition <= 0 and entry < 1 Then
buy("b",atlimit,dayhigh-PriceScale*80);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*50);
if MarketPosition >= 0 and entry < 1 Then
sell("s",atlimit,daylow+PriceScale*1350);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*60);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
----------------------------------
수식어 추가입니다.
1. 손절 20틱
2. 23시 50분부터 buy, sell 진입신호금지 수식어입니다.
청산은 무관합니다.
답변 1
예스스탁
예스스탁 답변
2020-07-20 15:24:45
안녕하세요
예스스탁입니다.
input : loss(20),EndTime(235000);
var : entry(0),Tcond(false);
if bdate != bdate[1] Then
{
entry = 0;
Tcond = true;
}
if (sdate != sdate[1] and stime >= EndTime) or
(sdate == sdate[1] and stime >= EndTime and stime[1] < EndTime) Then
Tcond = False;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition <= 0 and entry < 1 and Tcond == true Then
buy("b",atlimit,dayhigh-PriceScale*80);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*50);
if MarketPosition >= 0 and entry < 1 and Tcond == true Then
sell("s",atlimit,daylow+PriceScale*1350);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*60);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
SetStopLoss(PriceScale*loss,pointstop);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 수식어 부탁드립니다
> var : entry(0);
if bdate != bdate[1] Then
entry = 0;
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition <= 0 and entry < 1 Then
buy("b",atlimit,dayhigh-PriceScale*80);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*50);
if MarketPosition >= 0 and entry < 1 Then
sell("s",atlimit,daylow+PriceScale*1350);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*60);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
----------------------------------
수식어 추가입니다.
1. 손절 20틱
2. 23시 50분부터 buy, sell 진입신호금지 수식어입니다.
청산은 무관합니다.