Noen som kan finne hvorfor denne säljer selv om proft/loss eller tidOK inte er sann.
{$opt(para1,0.98,1,0.001)}
{$opt(para2,1,1.02,0.001)}
para1:=0.99
para2:=1.01
i1(
innehav=gt(portfolio(v),0)
tidOK=gt(FRAC(DATE()),0.72)
profit=gt(c,mult(lasttrade(b,p),para2))
loss=lt(c,mult(lasttrade(b,p),para1))
sell1=and(innehav,or(profit,loss))
sell2=or(sell1,tidOK)
mult(sell2,5)
)
{$opt(para1,0.98,1,0.001)}
{$opt(para2,1,1.02,0.001)}
para1:=0.99
para2:=1.01
i1(
innehav=gt(portfolio(v),0)
tidOK=gt(FRAC(DATE()),0.72)
profit=gt(c,mult(lasttrade(b,p),para2))
loss=lt(c,mult(lasttrade(b,p),para1))
sell1=and(innehav,or(profit,loss))
sell2=or(sell1,tidOK)
mult(sell2,5)
)
Comment