커뮤니티
수식부탁합니다.
2019-01-21 14:51:21
243
글번호 125449
Input : Period(240), MultiD(0.25);
var : MAv(0),BBup(0),BBdn(0);
MAv = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if MarketPosition <= 0 Then
{
if crossup(c,bbup) Then
buy("B1");
if H < BBup Then
Buy("b2",AtStop,BBup*1.01);
}
if MarketPosition >= 0 Then
{
if CrossDown(c, BBdn) Then
Sell("S1");
if H < BBdn Then
Sell("S2",AtStop, BBdn*0.99);
}
위수식에서
5% 이상 갭상승시에 10%을이익실현하고 전일종가까지하락시
10%를 재매수한다.(매도 즉시 전일종가 매수 주문 가능)
5% 이상 갭하락시에 10%을이익실현하고 전일종가까지상승시
10%를 재매수한다..(매수 즉시 전일종가 매도 주문 가능)
부탁합니다.
감사합니다.
답변 1
예스스탁 예스스탁 답변
2019-01-22 10:51:53
안녕하세요
예스스탁입니다.
Input : Period(240), MultiD(0.25);
var : MAv(0),BBup(0),BBdn(0);
MAv = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if MarketPosition <= 0 Then
{
if crossup(c,bbup) Then
buy("B1");
if H < BBup Then
Buy("b2",AtStop,BBup*1.01);
}
if MarketPosition >= 0 Then
{
if CrossDown(c, BBdn) Then
Sell("S1");
if H < BBdn Then
Sell("S2",AtStop, BBdn*0.99);
}
if MarketPosition == 1 Then
{
if bdate != bdate[1] Then
Condition1 = false;
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "bx" Then
Condition1 = true;
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "bb" Then
Condition1 = false;
if NextBarSdate != sdate[1] and NextBarOpen >= C*1.05 Then
{
var1 = max(1,Floor(MaxContracts*0.1));
ExitLong("bx",AtMarket,def,"",var1,2);
}
if Condition1 == true and dayopen >= DayClose(1)*1.05 and var1 > 0 Then
buy("bb",atlimit,DayClose(1),var1);
}
if MarketPosition == -1 Then
{
if bdate != bdate[1] Then
Condition2 = false;
if CurrentContracts < CurrentContracts[1] and LatestExitName(0) == "sx" Then
Condition2 = true;
if CurrentContracts > CurrentContracts[1] and LatestEntryName(0) == "ss" Then
Condition2 = false;
if NextBarSdate != sdate[1] and NextBarOpen <= C*0.95 Then
{
var2 = max(1,Floor(MaxContracts*0.1));
ExitShort("sx",AtMarket,def,"",var2,2);
}
if Condition2 == true and dayopen <= DayClose(1)*0.95 and var2 > 0 Then
sell("ss",atlimit,DayClose(1),var2);
}
즐거운 하루되세요
> 큰바위얼굴 님이 쓴 글입니다.
> 제목 : 수식부탁합니다.
> Input : Period(240), MultiD(0.25);
var : MAv(0),BBup(0),BBdn(0);
MAv = ma(C,Period);
BBup = BollBandUp(Period,MultiD);
BBdn = BollBandDown(Period,MultiD);
if MarketPosition <= 0 Then
{
if crossup(c,bbup) Then
buy("B1");
if H < BBup Then
Buy("b2",AtStop,BBup*1.01);
}
if MarketPosition >= 0 Then
{
if CrossDown(c, BBdn) Then
Sell("S1");
if H < BBdn Then
Sell("S2",AtStop, BBdn*0.99);
}
위수식에서
5% 이상 갭상승시에 10%을이익실현하고 전일종가까지하락시
10%를 재매수한다.(매도 즉시 전일종가 매수 주문 가능)
5% 이상 갭하락시에 10%을이익실현하고 전일종가까지상승시
10%를 재매수한다..(매수 즉시 전일종가 매도 주문 가능)
부탁합니다.
감사합니다.
다음글
이전글