Click here to Login





                                                   AMM scripting - error and some questions

  0

0
Alexander Horn
2014-02-03 01:29:12


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?

Thks, Alex








Rebalance & Combine & backtest two trading strategies (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

QuantShare
2014-02-03 13:06:52

  0

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))




Alexander Horn
2014-02-03 19:10:56

  0

Hi, thanks for your answers.

Sorry, referenced wrong item, the error is in the #functions# block here: Design and backtest a trading system with two strategies

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.





Design and backtest a trading system with two strategies (by QuantShare, uploaded several months ago)
No notes

Rate an item Rate an item Rate an item Rate an item Rate an item Number of downloads Notes Report an item

QuantShare
2014-02-04 12:23:17

  0

Best Answer
Hi,

The script was updated.

1/ Sorry, do not have compiled a list of links there

2/ You can use "comp()" or any other function in AMM. Example:

MMParser parser = Data.ParseFormula("a = comp('close', 'rank');");
TimeSeries a = parser.GetTimeSeries("Symbol", "a");
double lastRank = a[0];






No more messages
0




Reply:

No html code. URLs turn into links automatically.

Type in the trading objects you want to include: - Add Objects
To add a trading object in your message, type in the object name, select it and then click on "Add Objects"










QuantShare

Trading Items
Sector Surfer AMM Model
Adaptive Asset Allocation Butler V1.3 AMM
Minimum Variance Optimization with Solver V1.1- AMM
TAA - Momentum and Volatility
Time-series location relative to its high and low

How-to Lessons
How to download EOD quotes for active and valid stocks only
Difference between the watchlist and the screener tools
How to create trading rules based on Put and Call volume data
How to plot support and resistance lines automatically
How to create and trade a Neural Network model

Related Forum Threads
Adjust the Entry and exit prices of trades in AMM script
Comp() in QS language and AMM if no Market Data
Basic features and some issues with the background
Set Global Variable Between Strategy and AMM
First time here. Questions about Excel and Quantshare

Blog Posts
How to create and backtest thousands of trading rules in less tha...
Backtesting chart patterns using the auto support and resistance ...
6 ways to download free intraday and tick data for the U.S. stock...
How to create buy and sell trading rules based on News Data
Different periodicities and chart bar types in QuantShare Trading...









QuantShare
Product
QuantShare
Features
Create an account
Affiliate Program
Support
Contact Us
Trading Forum
How-to Lessons
Manual
Company
About Us
Privacy
Terms of Use

Copyright © 2024 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items



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.