아래 식을 코인에서 적용할 때 수량이 아니라 금액으로 매수하려고 합니다.
금액 추가 부탁드립니다.
input : ntime(30);
var : S1(0),D1(0),TM(0),TF(0),OO(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
OO = O;
}
if MarketPosition <= 0 and OO > 0 and C > OO and C > O and C[1] < O[1] Then
Buy();
if MarketPosition == 1 and C < O Then
ExitLong();
}
답변 1
예스스탁
예스스탁 답변
2024-02-16 14:35:50
input : ntime(30),금액(10000000);;
var : S1(0),D1(0),TM(0),TF(0),OO(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
OO = O;
}
if MarketPosition <= 0 and OO > 0 and C > OO and C > O and C[1] < O[1] Then
Buy("b",OnClose,Def,금액/c);
if MarketPosition == 1 and C < O Then
ExitLong();
}
> 선물대장 님이 쓴 글입니다.
> 제목 : 문의 드립니다.
> 아래 식을 코인에서 적용할 때 수량이 아니라 금액으로 매수하려고 합니다.
금액 추가 부탁드립니다.
input : ntime(30);
var : S1(0),D1(0),TM(0),TF(0),OO(0);
if Bdate != Bdate[1] Then
{
S1 = TimeToMinutes(stime);
D1 = sdate;
}
if D1 > 0 then
{
if sdate == D1 Then
TM = TimeToMinutes(stime)-S1;
Else
TM = TimeToMinutes(stime)+1440-S1;
TF = TM%ntime;
if Bdate != Bdate[1] or
(Bdate == Bdate[1] and ntime > 1 and TF < TF[1]) or
(Bdate == Bdate[1] and ntime > 1 and TM >= TM[1]+ntime) or
(Bdate == Bdate[1] and ntime == 1 and TM > TM[1]) Then
{
OO = O;
}
if MarketPosition <= 0 and OO > 0 and C > OO and C > O and C[1] < O[1] Then
Buy();
if MarketPosition == 1 and C < O Then
ExitLong();
}