답변완료
문의드립니다.
늘 감사합니다.
아래 수식을 변경해 주시면 감사하겠습니다
아래 수식에서 b1 매수후 수익청산되면 더이상 진입하지 않게 해주십시요.
또 b1, b2까지 매수후 수익청산되도 더이상 진입하지 않게 해주시면 감사하겠습니다.
고맙습니다.
input : N(10),금액1(10000);
var : cnt(0),entry(0);
if Bdate != bdate[1] Then
{
entry = 0;
var1 = 0;
Var2 = 0;
For cnt = 1 to N
{
if var1 == 0 and Var2 == 0 and DayClose(cnt) >= DayClose(cnt+1)*1.08Then
{
var1 = DayClose(cnt);
Var2 = DayClose(cnt+1);
}
}
}
if (MarketPosition != 0 and MarketPosition != MarketPosition[1]) or
(MarketPosition != MarketPosition[1] and TotalTrades > TotalTrades[1]) Then
entry = entry+1;
if MarketPosition == 0 and var1 > 0 and entry < 1 Then
Buy("b1",AtLimit,(var1+Var2)/2,Floor(금액1/min(NextBarOpen,(var1+Var2)/2)));
if MarketPosition == 1 Then
{
if MarketPosition != MarketPosition[1] Then
{
value1 = var1[BarsSinceEntry];
Value2 = var2[BarsSinceEntry];
}
Buy("b2",AtLimit,Var2,Floor(금액1/min(NextBarOpen,Var2)));
ExitLong("bx1",atlimit,AvgEntryPrice*1.30);
}
2022-08-09
1043
글번호 161405
시스템
답변완료
수식 변경 부탁 드립니다
키움 수식 입니다 변경 부탁 드립니다.
1.
매수
Period = 17
A = Lowest(L, Period);
B = ValueWhen(1, A(1) != A, CCI(Period));
A(1) > A and B(1) < B
매도
A = Lowest(L, Period);
B = ValueWhen(1, A(1) != A, CCI(Period));
A(1) < A and B(1) > B
2. 매수
Period = 17
lowest(C(1), Period) > C
매도
highest(C(1), Period1) > C
2022-08-09
1239
글번호 161404
시스템
답변완료
EntriesToday 함수 Source를 알고 싶어요
아래 적은것은 TS의 수식이거든요.
YesLanguage로능 어떻게하는것인지 알고 싶어요
---------------------------------------------------------------
{ Search Tag: WA-EntriesToday }
{ NOTE: Information is available only for the most recent 10 positions, so if the
target date is set too far back from the current bar, or if the strategy opens and
closes positions very frequently, this function may not produce accurate results. }
inputs: TargetDate_YYYMMDD( numericsimple ) ; { pass in the date in YYYMMDD format,
with the year 2002 being written as 102, etc }
variables: Count( 0 ) ;
Count = 0 ;
for Value1 = 0 to 10
begin
if EntryDate( Value1 ) = TargetDate_YYYMMDD then
Count = Count + 1 ;
end ;
EntriesToday = Count ;
{ ** Copyright © TradeStation Technologies, Inc. All Rights Reserved / 저작권 소유 **
** TradeStation reserves the right to modify or overwrite this analysis technique
with each release. ** }
2022-08-09
1614
글번호 161402
사용자 함수