On below AMM trading item 529 I'm getting a compiler error in the #functions# block of onperiodend, line 69 and below: "Data", "Functions", "Order" does not exist in the current context. Need to reference any other namespace?
I'm trying to bundle the different buy/sell checks and actions into functions to make the main code logic easier to understand, and this trading item is helpful. Code is getting hard to read/debug if it's all in one block...
Trying to get used to AMM, so allow me some questions:
1) Do you have any other example MM script (beside the published) or "best practice" tip on how to structure main code (trading regine, trading frequency, logic check) and use functions to perform actions?
2) Performance: Can formula parsing and "GetTimeSeries" be somehow done in Global / OnStartSimulation instead of OnPeriodEnd? Or does this not really speed up things?
I am not getting any error on this script and there is no #functions# block there. You probably referring to a different MM script.
1/ Please check our blog and search for titles containing "Money Management"
2/ Not possible. Parsing and "GetTimeSeries" are already optimized, particularly if you load the data in memory (Accounts -> Application Settings -> Money Management -> Load Quotes... (check it))
1) Currently doing and inded very helpful examples. Also noticed that sometimes you upload scripts on http://www.quantshare/free. Is there a list of what is available there?
2) Loading into memory indeed speeds up, thks!
One more question on ranking within AMM. Currently using one of your examples where looping through symbols and setting "highscore". Is there any way to use comp() to get rank also in AMM? Tried but w/o success.
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.