Click here to Login





                                                   Scale_in on Today's close

  0

0
Vangelis M.
2012-09-14 14:35:34


I am writing an EOD MM script that add to an existing position if today's close is lower than the entry price.

[OnEndPeriod]-->

if(close[0]<pos.EntryPrice)
{
Functions.AddLongPosition(pos.Symbol, shares,Orders.CloseMarketOrder() );
}

This enters the trade Tommorow. Is it possible to scale-in at Today's close?





QuantShare
2012-09-14 14:46:02

  0

Best Answer
It enters a trade depending on your trading system settings.

To scale-in at today's close, use:
Orders.CloseMarketOrder(-1, 5) // Valid for 5 days




Vangelis M.
2012-09-14 14:53:02

  0

Thanks. That was a fast!
It works.



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
High to low stock pattern for the close price
Market Rule based on the Crossover Between Stock Close prices and...
Scale-in Trading Strategy
% bars in last N trading days where stock close price increased
Close Price Above Cursor

How-to Lessons
How to dynamically change the number of positions in a portfolio?
How to create a screen
How to create a moving average of an indicator
How to add a trading indicator to a chart
How to associate an index with a list of stocks

Related Forum Threads
Dynamic Checklist to Compare Open to yesterday's Close
Quality of fit of CLOSE to linear regression for last n bars.
close above the highest high in the last 5 days
Stop orders execute today vs tomorrow - potential peek-ahead?
Close price at certain date?

Blog Posts
Money Management: Scale-in Trading Strategy
Money Management: Optimize the scale-in strategy
How to Create a Custom Real-Time Table using QS Trading Software
The Ultimate Guide to Create Trading Systems in QuantShare
Trading Orders - Part 1









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.