답변완료
수정좀 부탁드려요
1. 아래의 수식을 그림처럼 수정좀 부탁드립니다
Input : shortPeriod(20), longPeriod(60);
var : VolOsc(0);
VolOsc = OSCV(shortPeriod,longPeriod);
if VolOsc > 0 then
{
Plot1(VolOsc,"+VO");
plot2(0,"-VO");
}
Else
{
Plot1(0,"+VO");
plot2(VolOsc,"-VO");
}
PlotBaseLine1(0,"기준선 0");
2020-07-23
1919
글번호 140893
지표
답변완료
수식어 부탁드립니다
if MarketPosition <= 0 Then
buy("b",atlimit,dayhigh-PriceScale*50);
if MarketPosition == 1 Then
exitlong("bx",atlimit,lowest(L,BarsSinceEntry)+PriceScale*40);
if MarketPosition >= 0 Then
sell("s",atlimit,daylow+PriceScale*700);
if MarketPosition == -1 Then
ExitShort("sx",atlimit,Highest(H,BarsSinceEntry)-PriceScale*40);
if sdate != sdate[1] Then
SetStopEndofday(55000);
if bdate != bdate[1] Then
SetStopEndofday(0);
----------------------------------------
buy 진입신호후 청산시 매수보다 청산가격이 높음에도 시뮬레이션에서 손실로 처리 됩니다.
어떤 특별한 이유라도 있는지 알고싶습니다.
수고하세요~
2020-07-22
2522
글번호 140872
시스템
답변완료
동일 틱수 표시 요청 드립니다.
* 전일 문의 드린 사항 입니다.
* 요청1 : <첨부 사진> 처럼 수익,손실이 틀리는데 맞출수는 없는지요?
→거래 종목 : 마이크로 S&P 500
* 요청2 : 청산 되면 TL, TX선 삭재좀 부탁 드립니다. (아무리 실습 해도 모르겠네요...-.-)
* 요청3 : <그림> 과 같이 매수 되어 목표수익 까지 오면 1차 "청산"표시만 하고
본전에 오면 매도 하는 청산 로직좀 부탁 드립니다.
즉 작은 수익이 되도 안팔고 계속 가지고 갈라고 합니다.
그러나 혹시 반대로 매수 가격 까지 오면 청산 입니다.
var : TL(0),str(""),TX(0);
var1 = ma(c,5) ;
var2 = ma(c,20) ;
if MarketPosition <= 0 and CrossUp(var1,var2) then
{
buy();
}
if MarketPosition >= 0 and CrossDown(var1,var2) then
{
sell();
}
if MarketPosition == 1 then
{
if C > entryprice then
str = "수익 : "+NumToStr(abs(C-entryprice)/PriceScale,0)+"틱";
else
str = "손실 : "+NumToStr(abs(C-entryprice)/PriceScale,0)+"틱";
if BarsSinceEntry == 1 then
{
TL = TL_new(entrydate,entrytime,entryprice,sdate,stime,c);
TX = text_new(sdate,stime,C,str);
}
else
{
TL_setend(TL,sdate,stime,c);
text_setlocation(tx,sdate,stime,c);
Text_SetString(TX, str);
}
if C > entryprice then
TL_setcolor(TL,red);
else
TL_setcolor(TL,blue);
}
if MarketPosition == -1 then
{
if C < entryprice then
str = "수익 : "+NumToStr(abs(C-entryprice)/PriceScale,0)+"틱";
else
str = "손실 : "+NumToStr(abs(C-entryprice)/PriceScale,0)+"틱";
if BarsSinceEntry == 1 then
{
TL = TL_new(entrydate,entrytime,entryprice,sdate,stime,c);
TX = text_new(sdate,stime,C,str);
}
else
{
TL_setend(TL,sdate,stime,c);
text_setlocation(tx,sdate,stime,c);
Text_SetString(TX, str);
}
if C < entryprice then
TL_setcolor(TL,red);
else
TL_setcolor(TL,blue);
}
* 매번 고맙 습니다. 수고하십시요.
2020-07-22
2556
글번호 140869
지표