Hi, I’m new to programming and have problems with the following idea (and I hope that I’m at the right place here): Start: Buying one share on breakout above the highest of the preceding n bars. Selling 2 shares on breakout below the lowest of the preceding n bars- then again buying two shares above the breakout and so on. This means to be invested with one share all of the time. Code: DEFPARAM CUMULATEORDERS = FALSE IF PRICE CROSSES BELOW LOWEST[n](low) THEN IF LONGONMARKET THEN SELL 500 cash AT MARKET ENDIF IF NOT LONGONMARKET THEN SELL 250 cash AT MARKET ENDIF ENDIF IF PRICE CROSSES ABOVE HIGHEST[n](high) THEN IF SHORTONMARKET THEN BUY 500 cash AT MARKET ENDIF IF NOT SHORTONMARKET THEN BUY 250 cash AT MARKET ENDIF ENDIF Problems: 1. This gives no results for different n on backtesting 2. What is the correct term for Bitcoin/USD (cash, share, unit…)? 3. On IG, the spread for BTCUSD is 50 USD presently. Does this mean I have to type in 50 for the spread? Thanks a lot if someone could help, it’s driving me crazy. ligand