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
Adaptive Asset Allocation Butler V1.3 AMM
Minimum Variance Optimization with Solver V1.1- AMM
Sector Surfer AMM Model
Optimizable Fibonacci Long and Short Trading System
ETF Number of securities, percent stock and cash - Historical Dat...

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 create and trade a Neural Network model
How to scale and move the chart Y-axis

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
Watch your support and resistance lines
Charting, Backtesting and Trading using Fundamental Data
Download historical EOD data for the stock, futures, ETF and Fore...
Reducing risk and increasing return by combining several trading ...
Day Trading: A trading system that combines intraday and EOD data









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.