Click here to Login





                                                   Duration input in Orders.CloseMarketOrder(timing, duration)?

  0

0
Dave Walton
2015-02-08 20:14:13


Hi QS, in the 'OnEndPeriod' event in AMM, I use Orders.CloseMarketOrder(timing, duration) to open a new position. I'm not clear on what the duration input is used for. Can you clarify? The timing part I get. The order executes at the timing I specify so I don't get the duration.


QuantShare
2015-02-09 01:51:29

  0

Best Answer
Hi Dave,

The "duration" is the number of bars to keep the order active (otherwise it is canceled).
Market orders are not necessarily executed on every bar. Example: Volume filter doesn't pass, no trading data for a specific bar...



Dave Walton
2015-02-15 14:02:23

  0

Thanks QS. I've thought about this some more. So basically you are saying that an order can be generated but will then "hang-out" until market data is valid or the volume filter passes? The duration then gives the maximum number of bars that orders are active and not executed. IS my understanding correct?


QuantShare
2015-02-16 01:43:08

  0

Yes, correct.


Dave Walton
2015-02-16 08:41:37

  0

Thanks QS.


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
Choose function
Occurrence Since
Global Market Rotation Strategy V1.4
Global Market Rotation Strategy V1.1
Triple Period Indicator

How-to Lessons
How to create a trading system
How to dynamically update the settings of an indicator
How to create a screen
How to import trading items from other accounts
How to quickly add a ticker symbol

Related Forum Threads
Error in formula
Percent Change (close) indictor
simulations and benchmarks
Beta and Correlation
Custom index/relative chart for TAA - Sector rotation

Blog Posts
Programming skills are not that important
How to Display the Year-to-Date Excess Return in a Pivot Table
Presentation of QuantShare's new Real Time Version
Inverse Fisher Transform: Indicator, composite and trading system
The custom trading indicators tool explained









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.