커뮤니티
수식 수정 부탁드립니다.
2019-05-04 18:09:44
182
글번호 128426
안녕하세요?
아래의 수식에서 하루매매 횟수를 외부변수에서 입력을하면 제대로 안됩니다.
3번을 하라고하면 2번을 하는것같고, 4번을하라고하면 3번을 매매하는것 같습니다.
한번 훑어 보시고, 문제점 수정부탁 드립니다.
감사합니다.
input : n(10),count(3),loss(10),profit(10);
var : t1(0),entry(0);
if bdate != bdate[1] Then
t1 = TotalTrades[1];
if MarketPosition == 0 Then
entry = TotalTrades-t1;
Else
entry = TotalTrades-t1+1;
if entry < count and MarketPosition == 0 and C >= O+PriceScale*n Then
buy();
if entry < count and MarketPosition == 0 and C <= O-PriceScale*n Then
sell();
SetStopLoss(PriceScale*loss,PointStop);
SetStopProfittarget(PriceScale*profit,PointStop);
답변 1
예스스탁 예스스탁 답변
2019-05-07 10:29:53
안녕하세요
예스스탁입니다.
수식에 이상이 없습니다.
count로 지정한 횟수 이상 진입하는 날이 없습니다.
즐거운 하루되세요
> 대구어린울프 님이 쓴 글입니다.
> 제목 : 수식 수정 부탁드립니다.
> 안녕하세요?
아래의 수식에서 하루매매 횟수를 외부변수에서 입력을하면 제대로 안됩니다.
3번을 하라고하면 2번을 하는것같고, 4번을하라고하면 3번을 매매하는것 같습니다.
한번 훑어 보시고, 문제점 수정부탁 드립니다.
감사합니다.
input : n(10),count(3),loss(10),profit(10);
var : t1(0),entry(0);
if bdate != bdate[1] Then
t1 = TotalTrades[1];
if MarketPosition == 0 Then
entry = TotalTrades-t1;
Else
entry = TotalTrades-t1+1;
if entry < count and MarketPosition == 0 and C >= O+PriceScale*n Then
buy();
if entry < count and MarketPosition == 0 and C <= O-PriceScale*n Then
sell();
SetStopLoss(PriceScale*loss,PointStop);
SetStopProfittarget(PriceScale*profit,PointStop);
다음글
이전글