답변완료
수정을 부탁 드립니다.
안녕하세요!
만들어주신 아래 수식에 수정을 부탁드립니다.
매수, 매도 , 청산 시 한글로 매수, 매도, 청산이라는 한글이 표시가 되도록 수정을 부탁 드립니다.
그리고 궁금한점이 있습니다.
만약 DATA1이 매수에 들어가면 동시에 DATA2는 매도에 들어가야 하는데 신호는 DATA1에서만 나타나고 DATA2에서는 나타나지 않습니다.
스프레드매매는 2종목이 동시에 매매에 들어가면 한종목은 수익, 한종목은 손실이 나타나서 청산시 한종목은 수익, 한종목은 손실로 마감이 되어야 되는거 아닌가요? 이때 손실보다 수익이 더 발생해서 차익만큼만 진짜 수익이 되는 걸 스프래드매매로 알고 있습니다.
그래서 스프레드매매를 수동으로 거래하시는 분들을 보면 매매창이 항상 매수, 매도창 2개가 떠 있습니다.
input : 매수진입(-3),매수청산(-1);
input : 매도진입(-1),매도청산(-3);
var : diff(0,data1);
diff = Data1(c)-Data2(c);
if MarketPosition <= 0 and diff <= 매수진입 and diff[1] > 매수진입 Then
Buy();
if MarketPosition == 1 and diff >= 매수청산 Then
ExitLong();
if MarketPosition >= 0 and diff >= 매도진입 and diff[1] < 매도진입 Then
Buy();
if MarketPosition == -1 and diff <= 매도청산 Then
ExitShort();
2025-07-11
230
글번호 192454
시스템
답변완료
키움신호를 검색식으로 요청드려봅니다.
안녕하세요.
키움신호인데.
검색식으로 요청 드립니다. 감사합니다.
이 신호에 .
조건 2개를 더 추가 하고 싶습니다.
조건1 주가등락률 5%이상
조건2 거래대금 100억이상
A=avg(c,수치);
B=A(1);
K=A/B*100;
Q=MA(K,기간,단순);
D=avg(c,기간1);
E=avg(c,기간2);
CrossUp(K,Q)
&& K<=수치2 && 종가>=시가 && C<C(1)*수치3
&& D<E && A<D
고맙습니다.
열공해보겠습니다.
2025-07-11
254
글번호 192452
종목검색
답변완료
문의
아래 수식은
국내 데이트레이딩
하루 2회 거래하는 수식입니다.
첫번째 진입(b1)에서 익절로 포지션을 청산했을 경우
거래를 중지하는 수식을 추가해주십시요.
b1 익절 이후 b2 진입은 성공율이 낮기 때문입니다.
항상 고맙습니다.
**************************************************************************************
Input : 최대(99999),최소(0),거래횟수(2);
input : lock1(103000),b1(9),진입눌림1(4),진입돌파1(2);
input : lock2(113000),b2(18),진입눌림2(3),진입돌파2(1);
input : als(50),atr1(0),atr2(32),agl(128);
input : bls(38),btr1(0),btr2(90),bgl(108);
var : T1(0,data1),entry(0,data1);
var : LL(0,data2),EH(0,data2),E1(0,data2),H1(0,data2);
var : i1(0,data2),S1(0,data2),L1(0,data2);
var : DH2(0,data2),DL2(0,data2);
if data1(Bdate != Bdate[1]) Then
T1 = TotalTrades;
if data2(Bdate != Bdate[1]) Then{
E1 = 0;
DH2 = data2(H);
DL2 = data2(L);
}
if data2(H > DH2) Then
DH2 = data2(H);
if data2(L < DL2) Then
DL2 = data2(L);
if MarketPosition == 0 Then
entry = TotalTrades-T1;
Else
entry = (TotalTrades-T1)+1;
if MarketPosition == 0 and entry == 0 Then{
if data2(E1 == 0 and C >= DL2+PriceScale*B1) Then{
E1 = 1;
H1 = data2(H);
i1 = data2(index);
}
if data2(E1 == 1 and index > i1) then{
if data2(H > H1) Then
H1 = data2(H);
if data2(L <= H1-PriceScale*진입눌림1) Then{
E1 = 2;
i1 = data2(index);
S1 = H1;
}
}
if stime<lock1 and 최대 >= C and C >= 최소 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파1) Then{
buy("b1");
}
}
if TotalTrades > TotalTrades[1] Then
LL = data2(L);
if data2(L < LL) Then
LL = data2(L);
if MarketPosition == 0 and entry >= 1 and entry < 거래횟수 Then{
if data2(E1 == 0 and C >= LL+PriceScale*B2 and C[1] < LL+PriceScale*B2) Then{
E1 = 1;
H1 = data2(H);
i1 = data2(index);
}
if data2(E1 == 1 and index > i1) then{
if data2(H > H1) Then
H1 = data2(H);
if data2(L <= H1-PriceScale*진입눌림2) Then{
E1 = 2;
i1 = data2(index);
S1 = H1;
}
}
if stime<lock2 and data2(E1 == 2 and index > i1 and C >= S1+PriceScale*진입돌파2) Then{
buy("b2");
}
}
if MarketPosition== 1 Then
{
if IsEntryName("b1") == true Then
{
SetStopLoss(PriceScale*als,PointStop);
SetStopTrailing(PriceScale*atr2,PriceScale*atr1,PointStop,1);
SetStopProfittarget(PriceScale*agl,PointStop);
}
Else if IsEntryName("b2") == true Then
{
SetStopLoss(PriceScale*bls,PointStop);
SetStopTrailing(PriceScale*btr2,PriceScale*btr1,PointStop,1);
SetStopProfittarget(PriceScale*bgl,PointStop);
}
Else
{
SetStopLoss(0);
SetStopTrailing(0,0);
SetStopProfittarget(0);
}
}
2025-07-11
256
글번호 192448
시스템
답변완료
신고가 신저가 수식문의
수고 많으십니다.
종가가 아닌 고가와 저가 기준으로 라인을 만들어 보려 하는데 고가는 그려지는데 저가 라인이 그려지질 않네요.
수정 부탁드립니다.
그리고 기간(26)의 저가와 고가가 동시에 상승하는 구간/저가와 고가가 동시에 하락하는 구간에 RED 와 BLUE로 색을 넣는 식도 부탁드립니다.
input : 기간(26);
if H > highest(H,기간)[1] Then
var1 = H;
if L < Lowest(L,기간)[1] Then
var2 = L;
if var1 > 0 Then
Plot1(var1,"신고가라인",ReD);
if var2 < 0 Then
Plot2(var2,"신저가라인",Blue);
2025-07-11
199
글번호 192429
지표
답변완료
지표 수식 부탁드립니다.
yt에서 배열을 어떻게 하는지 궁금하군요.
// @version=5
indicator("Liquidity Weighted Moving Averages [AlgoAlpha]", overlay = true, timeframe = "", timeframe_gaps = false)
// Define liquidity based on volume and price movement
priceMovementLiquidity = volume / math.abs(close - open)
outlierThreshold = input.int(10, "Outlier Threshold Length")
fastMovingAverageLength = input.int(50, "Fast MA length")
slowMovingAverageLength = input.int(100, "Slow MA length")
// Calculate the boundary for liquidity to identify outliers
liquidityBoundary = ta.ema(priceMovementLiquidity, outlierThreshold) + ta.stdev(priceMovementLiquidity, outlierThreshold)
// Initialize an array to store liquidity values when they cross the boundary
var liquidityValues = array.new_float(5)
// Check if the liquidity crosses above the boundary and up-date the array
if ta.crossover(priceMovementLiquidity, liquidityBoundary)
array.in-sert(liquidityValues, 0, close)
// Calculate the Exponential Moving Averages for the close price at the last liquidity crossover
fastEMA = ta.ema(array.get(liquidityValues, 0), fastMovingAverageLength)
slowEMA = ta.ema(array.get(liquidityValues, 0), slowMovingAverageLength)
// Plot the EMAs with dynamic coloring based on their crossover status
fastPlot = plot(fastEMA, color = fastEMA > slowEMA ? color.new(#ff1100, 50) : color.new(#00ffbb, 50))
slowPlot = plot(slowEMA, color = fastEMA > slowEMA ? color.new(#ff1100, 50) : color.new(#00ffbb, 50))
// Create a fill between the fast and slow EMA plots with appropriate color based on crossover
fill(fastPlot, slowPlot, fastEMA, slowEMA, fastEMA > slowEMA ? color.new(#ff1100, 50) : color.new(#00ffbb, 50), color.new(chart.bg_color, 80))
2025-07-11
273
글번호 192424
지표