if MarketPosition <= 0 Then
buy("b",atlimit,dayhigh-PriceScale*90);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*50);
if MarketPosition >= 0 Then
sell("s",atlimit,daylow+PriceScale*600);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*57);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
-------------------------------------
위 수식어에서 청산후 진입신호는 청산후 20분이 지난 캔들의 하이로우에서 다시 진입신호가 되도록 수식어를 부탁 드립니다.
늘 감사합니다.
답변 1
예스스탁
예스스탁 답변
2020-08-25 09:31:49
안녕하세요
예스스탁입니다.
input : N(20);
var : S1(0),D1(0),TM(0),entry(0);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
{
SetStopEndofday(0);
S1 = TimeToMinutes(stime);
D1 = sdate;
entry = 0;
}
if (MarketPosition != 0 and MarketPosition != MarketPosition(0)[1]) or
(MarketPosition == MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
}
if MarketPosition == 0 and (entry == 0 or (entry >= 1 and TM >= TM[BarsSinceExit(1)]+N)) Then
buy("b",atlimit,dayhigh-PriceScale*90);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*50);
if MarketPosition == 0 and (entry == 0 or (entry >= 1 and TM >= TM[BarsSinceExit(1)]+N)) Then
sell("s",atlimit,daylow+PriceScale*600);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*57);
즐거운 하루되세요
> 푸른 님이 쓴 글입니다.
> 제목 : 수식어 부탁드립니다
> if MarketPosition <= 0 Then
buy("b",atlimit,dayhigh-PriceScale*90);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*50);
if MarketPosition >= 0 Then
sell("s",atlimit,daylow+PriceScale*600);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*57);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
-------------------------------------
위 수식어에서 청산후 진입신호는 청산후 20분이 지난 캔들의 하이로우에서 다시 진입신호가 되도록 수식어를 부탁 드립니다.
늘 감사합니다.