수익과 손실을 제한하고 싶습니다.
차트 전체가 아니고 당일당일 최대 수익과 최대 손실을 제한하려면 어떻게해야 할까요?
Input : dd(20240101);
var : profit(0);
If profit < 100 and profit > -100 and sDate == sDate[1] Then {
Profit = NetProfit;
If CrossUp(ma(C,5), ma(C,20)) then Buy(B1); }
답변 1
예스스탁
예스스탁 답변
2024-03-28 11:45:33
안녕하세요
예스스탁입니다.
Input : dd(20240101);
var : N1(0),profit(0);
if Bdate != Bdate[1] Then
N1 = NetProfit;
profit = NetProfit-N1;
If profit < 100 and profit > -100 and sDate == sDate[1] Then
{
Profit = NetProfit;
If CrossUp(ma(C,5), ma(C,20)) then Buy("B1");
}
즐거운 하루되세요
> 후따오 님이 쓴 글입니다.
> 제목 : 수익 포인트 제어
> 수익과 손실을 제한하고 싶습니다.
차트 전체가 아니고 당일당일 최대 수익과 최대 손실을 제한하려면 어떻게해야 할까요?
Input : dd(20240101);
var : profit(0);
If profit < 100 and profit > -100 and sDate == sDate[1] Then {
Profit = NetProfit;
If CrossUp(ma(C,5), ma(C,20)) then Buy(B1); }