🔮Prediction mechanism
📈 Generated Predictions
// javascript
function generate_rnd_close(last_close, last_open) {
// Generate 6 random float between 0 and 1
const { float_0, float_1, float_2, float_3, float_4, float_5 } = get_rnd(6)
// The price can go up or down, and inscribe tendancy
let next_isup_min_val = 0.5 // standard value
if (last_close >= last_open) { // last candle is green
next_isup_min_val -= ( float_0 * 0.2 ) // 50 to 70 % of chance to go up
} else { // last candle is red
next_isup_min_val += ( float_0 * 0.2 ) // 30 to 50 % of chance to go up
}
let direction = "down" // can be : up, down
if (float_1 >= next_isup_min_val) { direction = "up" }
// Generate the next close price based on the last close price
// The price look to be organic and not random
let mouv_perc = 0 // the percentage of the movement
if (float_2 <= 0.1) { mouv_perc += float_2 / 10 }
if (float_3 <= 0.1) { mouv_perc += float_3 / 10 }
if (float_4 <= 0.1) { mouv_perc += float_4 / 10 }
if (float_5 <= 0.1) { mouv_perc += float_5 / 10 }
if (mouv_perc == 0) { mouv_perc = float_2 / 20 } // minimum mouv_perc
let mouv = mouv_perc * last_close
let result = null
if (direction == "down") {
result = last_close - mouv
} else {
result = last_close + mouv
}
result = Math.round(result)
return result
}🍃 Lightweight predictions
🔄 Randomness and Uniqueness
🔒 Decentralization and Security
⛓️ Smart Contracts for Fairness (coming soon)
🏆 Provable Ownership and Rarity
Last updated
