If I use Optimize to test different parameters for a variable I noticed there is Variable Name, Min, Max, Step but no default value. If I set the min max and step it works fine for the Optimize but how to I set a default value for when I RUN the system it will take that value?
I'm also used to the Amibroker version with Default setting, but here how you can simulate. Simply put opti=0 to fix some values for one run, or =1 to optimize, see below. Hope it helps..
Btw, I'm also working on ranking rules like EtfReplay, Accutrack, IDB, send me a PM if you want to exchange....
Best,
Alex
// Optimize settings -- Opti = 0 means fix best values, 1 means optimize
opti = 0;
to follow up on your great script above, I added 2 more variables but these don't seem to work. They are long (decimals), does this make a difference? Do I need to declare them as such? When I run the simulation all I get is
weight1 = 0 and weight2 = 0 instead of 0.5 and 0.5
PS If I set to 1 and optimize it works fine. Only when I set to 0 so I can use my own value that it doesn't accept the 0.5.
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.