Untitled

Anonymous
plain_text
01/09/2025 2:41 PM
540 B
42
Indexable
qty(int n) =>
    lots = 0.0
    pos = lots
    neg = 0.0
    target = k // rr
    spread = 0.1
    pips = k + 1 + spread
    for i=0 to n
        if i == 0
            lots := startQty // initial qty
        else
            _pos = pos
            lots := math.ceil(math.round(((pos * pips / target) - neg) / step, 9)) * step
            pos := neg + lots
            neg := _pos
    lots
Editor is loading...
Leave a Comment