답변완료
문의 드립니다
일봉매매에서 수식어 부탁드립니다
전일대비 0.00% 매수 0.50% 청산
그 이후 0.6% 매수 1.00% 청산
익절100 손절50
----------------------
전일대비 0.51% 매도 -0.80% 청산
그 이후 -1.00% 매수 -0.50% 청산
익절100 손절50
--------------------------------------------------
1.
input : 익절틱수(160),손절틱수(100);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("ss",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("ss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b2",AtStop,NextBarOpen+PriceScale*10);
Sell("s2",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("bx2",AtStop,NextBarOpen-PriceScale*10);
ExitShort ("sx2",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("sss",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("sss1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b8",AtStop,NextBarOpen+PriceScale*10);
Sell("s8",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx8",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx8",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("bb",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("bb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b9",AtStop,NextBarOpen+PriceScale*10);
Sell("s9",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx9",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx9",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition == 1 Then
Sell("bbb",AtStop,EntryPrice-10);
if MarketPosition == -1 Then
Buy("bbb1",AtStop,EntryPrice+10);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
2.
input : 익절틱수(180),손절틱수(100);
if NextBarSdate != sDate Then
{
if NextBarOpen > C Then
{
Buy("b",AtStop,NextBarOpen+PriceScale*10);
Sell("s",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen > C Then
{
ExitLong("bx",AtStop,NextBarOpen-PriceScale*10);
ExitShort("sx",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("ss",AtStop,EntryPrice-30);
if MarketPosition < -1 Then
Buy("ss1",AtStop,EntryPrice+30);
if NextBarSdate != sDate Then
{
if NextBarOpen < C Then
{
Buy("b1",AtStop,NextBarOpen+PriceScale*10);
Sell("s1",AtStop,NextBarOpen-PriceScale*10);
}
if NextBarOpen < C Then
{
ExitLong("b1x",AtStop,NextBarOpen-PriceScale*10);
ExitShort("s1x",AtStop,NextBarOpen+PriceScale*10);
}
}
if MarketPosition > 1 Then
Sell("sss",AtStop,EntryPrice-30);
if MarketPosition < -1 Then
Buy("sss1",AtStop,EntryPrice+30);
SetStopProfittarget(PriceScale*익절틱수,PointStop);
SetStopLoss(PriceScale*손절틱수,PointStop);
-------------------------------
위 1, 2번은 ==, < > 의 스위칭기호가 포함된 수식어 입니다.
그래프의 체결내용은 아침에 매도후 매도청산 그리고 매수로 나옵니다.
잔고현황에는 계약수가 없는데 스위칭기호중 ==, < > 중 하나를
잘못 선택한 경우인지 아니면 다른 선택이 있는지 문의 드립니다.
그리고 게시판 질답에 일봉 당일청산은 불가 하다고 글들이 있어서
다른방법 또한 있는지요.
2022-10-07
1028
글번호 162801
시스템