->

Risk = <
               50
               20
               10
                5
                4
            Pi ()
                3
            Exp 1
                2
             1.95
             1.90
             1.80
             1.75
             1.5 
             1.25
       >

Result : List : Float <- Float = <> ..

Half_of_return = Exp 1; Traders = 250; Deposit = 10; Steps = 100

Do get N from Risk
 Result->N = Deposit_{all} / Traders
 ' Deposit_{all} - Trade >Deposit_{all}< N Half_of_return Traders Deposit Steps 
;

Do get N, Res from Result
 Say N_{rounded} "\t" '=> ' Res
 ' N_{rounded} <- N # '0.00'
;

/

Trade ->
Arg D : &Float 
    N, Half_of_return : Float  
    Traders, Deposit, Steps : Integer
    
Do Traders
 D += Deposit_{trader}
 ' Deposit_{trader} - Trade >Deposit_{trader}< N Half_of_return Deposit Steps 
;

/

Trade Trade ->
Arg D : &Float,
    N, Half_of_return : Float, 
    Deposit, Steps : Integer

D = Deposit

Do Steps
 D -= D / N

 If Random 0 1 then
  D += Random 0 ((D / N) * (Half_of_return * 2))
 ;
;

/