예스스탁
예스스탁 답변
2021-05-03 10:32:02
안녕하세요
예스스탁입니다.
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 Highest(H,BarsSinceEntry) >= EntryPrice+PriceScale*7 Then
ExitLong("bx",AtStop,Highest(H,BarsSinceEntry)-PriceScale*3);
}
if MarketPosition == -1 Then
{
Buy("sb",AtStop,EntryPrice+PriceScale*10);
if CrossUp(sma7,sma8) Then
ExitShort("-");
if lowest(L,BarsSinceEntry) <= EntryPrice-PriceScale*7 Then
ExitShort("sx",AtStop,lowest(L,BarsSinceEntry)+PriceScale*3);
}
즐거운 하루되세요
> 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
{
sell("bs",AtStop,EntryPrice-PriceScale*10);
}
if MarketPosition == -1 Then
{
Buy("sb",AtStop,EntryPrice+PriceScale*10);
if CrossUp(sma7,sma8) Then
ExitShort("-");
}
위 수식 에서 매매 를 하여 이익 이 발생 하다가 (7틱 이익 되다가 3틱 이상 하락
하면 익절 청산) 하는 수식 을 추가 로 부탁 드립니다
***** 수고 하세요 *****