js simulated correctly, real-time computation wrong

Author: afanxingzhou, Created: 2019-05-30 10:35:09, Updated:

I have this calculation: data.lastprice is the upfront transaction price, changeprice_sell is the change value, data.avgprice is the average price. The purpose of this calculation is to find the maximum value of the upfront transaction price + the change value and the average price + the change value. The code is as follows: The next value is the value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the next value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of the last value of

img

nextsell is a local variable within the function, the data object and changeprice_sell are global variables, where changeprice_sell can be modified in real time via interactive templatesimg

The problem now is: the simulation is running, the next cell calculation is correct.imgThe disk is running logs, but it's not.img


More

The Little DreamIt is suggested that you perform a modification in the interaction place of a variable and then add a Log (()) output, output XXX value has been modified completed This makes it easier to judge the process of the program. Check the BUG.

The Little DreamYou have used the interaction to change the value of changeprice_sell during the policy run, considering that if the policy has already calculated nextsell, then your changeprice_sell is triggered, from 0 to 100, not the above.