Forums › ProRealTime English forum › ProOrder support › Coding a breakout strategy for bitcoin › Reply To: Coding a breakout strategy for bitcoin
10/25/2018 at 6:22 AM
#83487
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
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 |
Hello, the [Insert PRT Code] is your friend 🙂