안녕하세요.
아래 수식에서
5일 이평선값 위에서는 임의의 조건 수식(A) 에 의해 매수진입과 매수청산만 하고
5일 이평선값 아래에서는 임의의 조건 수식(B) 에 의해 매도진입과 매도청산만 하는
조건식 부탁드립니다.
If LemaV > LemaV[1] and LmacdOsc > LmacdOsc[1] then {
if emaV > emaV[1] and macdOsc > MacdOsc[1] Then
Buy("123");
}
if MP == 1 and MP[1] <> 1 then Begin
StopPrice = high - ma(range,100)*mult;
end;
If MP == 1 then begin
Sell ("456",AtStop,stopprice + 1 );
답변 1
예스스탁
예스스탁 답변
2023-07-17 08:56:22
안녕하세요
예스스탁입니다.
input : P(5);
var : mav(0),MP(0);
mav = ma(C,P);
MP = MarketPosition;
if C > mav Then
{
If LemaV > LemaV[1] and LmacdOsc > LmacdOsc[1] then
{
if emaV > emaV[1] and macdOsc > MacdOsc[1] Then
Buy("123");
}
if MP == 1 Then
{
if MP == 1 and MP[1] <> 1 then
StopPrice = high - ma(range,100)*mult;
ExitLong("456",AtStop,stopprice + 1 );
}
}
if C < mav Then
{
매도진입과 매도포지션 청산식
}
즐거운 하루되세요
> 바다사당 님이 쓴 글입니다.
> 제목 : 5일 이평선 매수 청산
> 안녕하세요.
아래 수식에서
5일 이평선값 위에서는 임의의 조건 수식(A) 에 의해 매수진입과 매수청산만 하고
5일 이평선값 아래에서는 임의의 조건 수식(B) 에 의해 매도진입과 매도청산만 하는
조건식 부탁드립니다.
If LemaV > LemaV[1] and LmacdOsc > LmacdOsc[1] then {
if emaV > emaV[1] and macdOsc > MacdOsc[1] Then
Buy("123");
}
if MP == 1 and MP[1] <> 1 then Begin
StopPrice = high - ma(range,100)*mult;
end;
If MP == 1 then begin
Sell ("456",AtStop,stopprice + 1 );