커뮤니티
함수 변환 부탁드립니다.
2018-04-11 23:29:08
149
글번호 118111
안녕하세요.
함수 변환 부탁드립니다.
[IOG = true]
Input : Limit_Count(6); //진입횟수제한
Var : TickSize(0), oRange(0), odayopen(0), Predayhigh(0), Predaylow(0);
TickSize = PriceScale;
odayopen = dayopen(0);
Predayhigh = dayhigh(1);
Predaylow = daylow(1);
oRange = Predayhigh - Predaylow;
If Predayhigh > 0
And (MarketPosition == 0 And EntriesToday(date) < Limit_Count)
Or (MarketPosition <> 0 And EntriesToday(date) < Limit_Count - 1) Then
begin
If C > odayopen + oRange Then Buy("B", atstop, odayopen + oRange * 1/4);
If C < odayopen - oRange Then Sell("S", atstop, odayopen + oRange * 1/4);
End;
If date <> date[1] Then
Begin
ExitLong("시가 매수청산");
ExitShort("시가 매도청산");
End;
Input : PT(20);
SetStopProfittarget(PT * TickSize);
SetStopLoss(oRange * 1/4);
감사합니다.
답변 1
예스스탁 예스스탁 답변
2018-04-12 14:26:08
안녕하세요
예스스탁입니다.
Input : Limit_Count(6); //진입횟수제한
Input : PT(20);
Var : oRange(0), odayopen(0), Predayhigh(0), Predaylow(0);
var : T1(0),EntriesToday(0);
if bdate != bdate[1] Then
T1 = TotalTrades;
if MarketPosition == 0 Then
EntriesToday = TotalTrades-t1;
Else
EntriesToday = TotalTrades-t1+1;
odayopen = dayopen(0);
Predayhigh = dayhigh(1);
Predaylow = daylow(1);
oRange = Predayhigh - Predaylow;
If Predayhigh > 0 And EntriesToday < Limit_Count Then
begin
If C > odayopen + oRange Then
Buy("B", atstop, odayopen + oRange * 1/4);
If C < odayopen - oRange Then
Sell("S", atstop, odayopen + oRange * 1/4);
End;
If date <> date[1] Then
Begin
ExitLong("시가 매수청산");
ExitShort("시가 매도청산");
End;
SetStopProfittarget(PT * PriceScale,PointStop);
SetStopLoss(oRange * 1/4,PointStop);
즐거운 하루되세요
> 바둑이 님이 쓴 글입니다.
> 제목 : 함수 변환 부탁드립니다.
> 안녕하세요.
함수 변환 부탁드립니다.
[IOG = true]
Input : Limit_Count(6); //진입횟수제한
Var : TickSize(0), oRange(0), odayopen(0), Predayhigh(0), Predaylow(0);
TickSize = PriceScale;
odayopen = dayopen(0);
Predayhigh = dayhigh(1);
Predaylow = daylow(1);
oRange = Predayhigh - Predaylow;
If Predayhigh > 0
And (MarketPosition == 0 And EntriesToday(date) < Limit_Count)
Or (MarketPosition <> 0 And EntriesToday(date) < Limit_Count - 1) Then
begin
If C > odayopen + oRange Then Buy("B", atstop, odayopen + oRange * 1/4);
If C < odayopen - oRange Then Sell("S", atstop, odayopen + oRange * 1/4);
End;
If date <> date[1] Then
Begin
ExitLong("시가 매수청산");
ExitShort("시가 매도청산");
End;
Input : PT(20);
SetStopProfittarget(PT * TickSize);
SetStopLoss(oRange * 1/4);
감사합니다.
다음글
이전글