예스스탁
예스스탁 답변
2021-04-27 10:41:53
안녕하세요
예스스탁입니다.
1
현재 4틱 손실일때 스위칭은 이평기준으로 진입하는 b와 s 진입일때만 발생합니다.
if IsEntryName("b") == true Then
if IsEntryName("s") == true Then
위 2개 문장을 삭제하시면 모든 매수집입과 매도진입에서 지정한틱 손실일때 스위칭을 하게 됩니다
2
if MarketPosition == 1 and CrossUp(sma7,sma8) Then
ExitShort("-");
ExitShort은 매도포지션 청산입니다.
작성하신 식에서는 매수포지션(MarketPosition == 1)에 발생하라고 되어 있어
신호가 발생할 수 없습니다. 매수포지션 청산은 exitlong입니다.
3
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);
var1 = ma(C,1);
Var2 = ma(C,5);
if CrossDown(var1,Var2) Then
{
t = -1;
s = c;
}
if CrossUp(var1,Var2) Then
{
t = 1;
s = c;
}
if t == -1 Then
Buy("b",AtLimit,S-PriceScale*15);
if t == 1 Then
Sell("s",AtLimit,S+PriceScale*15);
if MarketPosition == 1 Then
{
sell("bs",AtStop,EntryPrice-PriceScale*10);
}
if MarketPosition == -1 Then
{
Buy("sb",AtStop,EntryPrice+PriceScale*10);
if CrossUp(sma7,sma8) Then
ExitShort("-");
}
즐거운 하루되세요
> 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);
var1 = ma(C,1);
Var2 = ma(C,5);
if CrossDown(var1,Var2) Then
{
t = -1;
s = c;
}
if CrossUp(var1,Var2) Then
{
t = 1;
s = c;
}
if t == -1 Then
Buy("b",AtLimit,S-PriceScale*15);
if t == 1 Then
Sell("s",AtLimit,S+PriceScale*15);
if MarketPosition == 1 Then
{
if IsEntryName("b") == true Then
sell("bs",AtStop,EntryPrice-PriceScale*4);
if MarketPosition == 1 and CrossUp(sma7,sma8) Then
ExitShort("-");
}
if MarketPosition == -1 Then
{
if IsEntryName("s") == true Then
Buy("sb",AtStop,EntryPrice+PriceScale*4);
}
매매 반대방향 으로 갈때 4틱손절 후 반대 매매 가 잘 되다가 중간 에
한번씩 수식대로 안되네요 (원인 이 어디 있을까요 ? 잘 하다가 한번 에 큰 손실 을
보니 꼭 해결 을 부탁 드립니다 * 매수 를 했는데 10 틱 이상 하락 하면 청산 과 매도
를 체결 , 매도 를 했는데 10 틱 이상 상승 하면 청산 과 매수 체결 이 반드시 이루어
지게 부탁 드립니다) 그리고 청산 수식 을 넣었는데 실행 이 안되네요
검토 수정 부탁드립니다.
*** 수고 하세요 ***