Hi I want to create a logic where a random variable is applied to an indicator
a= indicator1;
b= random(0,100);
c= a+b;
when back testing this, how can I make the B variable random for each and every trade instead of staying constant for all trades.
for example, on day 1, there are 10 different symbols. each have their unique indicator1 value. i want B to be unique and random for each one of the symbols
day 1=
stock A random value = 1
stock B random value = 4
stock C random value = 2
stock D random value = 99
etc
day 2=
stock A random value = 50
stock B random value = 30
stock C random value = 6
stock D random value = 1
etc
The above indicator is not what I am looking for. It's similar to what I am looking for. The above indicator assigns a random variable to EACH NEW BAR. I just want it to assign a random variable ONCE to each new stock. So for example, if I have 10 stocks, I want each of the 10 stocks to have their own random variable. The default random indicator gives one random item and assigns the same item to all stocks. The randomvalues indicator assigns different random items to each stock but does it for every single bar. I just want it to do it at the beginning of the day.
Trading financial instruments, including foreign exchange on margin, carries a high level of risk and is not suitable for all investors. The high degree of leverage can work against you as well as for you. Before deciding to invest in financial instruments or foreign exchange you should carefully consider your investment objectives, level of experience, and risk appetite. The possibility exists that you could sustain a loss of some or all of your initial investment and therefore you should not invest money that you cannot afford to lose. You should be aware of all the risks associated with trading and seek advice from an independent financial advisor if you have any doubts.