첨부 이미지
그림1
그림2
수고 하십니다 !
Input : Period1(1), Period2(5), Period3(30), Period4(60), Period5(120),period6(240), Period7(480), Period8(960),period9(1920);
var : sma1(0),sma2(0),sma3(0),sma4(0),sma5(0),sma6(0),sma7(0),sma8(0),sma9(0);
sma1 = ma(C,period1);
sma2 = ma(C,period2);
sma3 = ma(C,period3);
sma4 = ma(C,period4);
sma5 = ma(C,period5);
sma6 = ma(C,period6);
sma7 = ma(C,period7);
sma8 = ma(C,period8);
sma9 = ma(C,period9);
var : t(0),s(0);
if MarketPosition <= 1 and sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 < sma5 and sma5 < sma6 and sma6 < sma7 and sma7 < sma8 and sma8 < sma9 Then
{
t = -1;
s = c;
}
if MarketPosition >= -1 and sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and sma5 > sma6 and sma6 > sma7 and sma7 > sma8 and sma8 > sma9 Then
{
t = 1;
s = c;
}
if t == -1 Then
Buy ("b");
if t == 1 Then
Sell("s");
if MarketPosition == 1 Then
{
sell("bs",AtStop,EntryPrice-PriceScale*10);
if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15 Then
ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)-PriceScale*10);
}
if MarketPosition == -1 Then
{
Buy("sb",AtStop,EntryPrice+PriceScale*10);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*15 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*10);
}
위 수식 대로라면 0,1 같은 청산 이 나오면 안되는데 자꾸 나오네요 원인 이 무엇인가 검토하고
수정 좀 꼭 부탁 드립니다
***** 수고 하세요 *****
답변 1
예스스탁
예스스탁 답변
2021-05-07 15:00:00
안녕하세요
예스스탁입니다.
올려주신 수식에 10틱 손실이면 스위칭하는 내용이 있습니다
해당수식에서 "bs","sb"로 지정된 신호입니다.
10틱 손실에 스위칭하지 않고자 하시면 해당내용 삭제하시면 됩니다.
즐거운 하루되세요
> tnsflwls 님이 쓴 글입니다.
> 제목 : 시스템 이상 검토의뢰
> 수고 하십니다 !
Input : Period1(1), Period2(5), Period3(30), Period4(60), Period5(120),period6(240), Period7(480), Period8(960),period9(1920);
var : sma1(0),sma2(0),sma3(0),sma4(0),sma5(0),sma6(0),sma7(0),sma8(0),sma9(0);
sma1 = ma(C,period1);
sma2 = ma(C,period2);
sma3 = ma(C,period3);
sma4 = ma(C,period4);
sma5 = ma(C,period5);
sma6 = ma(C,period6);
sma7 = ma(C,period7);
sma8 = ma(C,period8);
sma9 = ma(C,period9);
var : t(0),s(0);
if MarketPosition <= 1 and sma1 < sma2 and sma2 < sma3 and sma3 < sma4 and sma4 < sma5 and sma5 < sma6 and sma6 < sma7 and sma7 < sma8 and sma8 < sma9 Then
{
t = -1;
s = c;
}
if MarketPosition >= -1 and sma1 > sma2 and sma2 > sma3 and sma3 > sma4 and sma4 > sma5 and sma5 > sma6 and sma6 > sma7 and sma7 > sma8 and sma8 > sma9 Then
{
t = 1;
s = c;
}
if t == -1 Then
Buy ("b");
if t == 1 Then
Sell("s");
if MarketPosition == 1 Then
{
sell("bs",AtStop,EntryPrice-PriceScale*10);
if Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*15 Then
ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)-PriceScale*10);
}
if MarketPosition == -1 Then
{
Buy("sb",AtStop,EntryPrice+PriceScale*10);
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*15 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*10);
}
위 수식 대로라면 0,1 같은 청산 이 나오면 안되는데 자꾸 나오네요 원인 이 무엇인가 검토하고
수정 좀 꼭 부탁 드립니다
***** 수고 하세요 *****