Click here to Login

Trading Software Trading objects Features How-to Blog Search


                                                   Buy/Sell order types w/Simulator

  0

0
Russ
2010-09-19 20:43:10


Greetings everyone, I have just recently downloaded and starting learning the QuantShare software and am glad to join this community. I have previously used and am still using Fidelity's Wealth Lab software to backtest trading strategies.

Wealth Lab uses a single C# code editor that runs the entire backtesting process (buy/sell signals, money managment, ranking systems, ect) and moving over to QuantShare has seemed a little fragmented. I will likely have many questions in the future but try to limit them to one at a time :)

I have a basic understanding of computer programming languages and have been working with the formula editor in QuantShare's simulator. My first problem has been trying to find a way to create two different sell signals, one that uses a Sell on Close market order and another one that uses a limit order.

Thus, is there a way to program this into the formula editor or another method to use these two sell signals simutaneously???

1) Sell at Close if Close[bar] < 50 day simple moving average
2) Sell at Limit of Highest Value of last 250 days


Thanks for any help!

Russ



QuantShare
2010-09-20 06:14:56

  0

Best Answer
Welcome to our community Russ.

There are several ways to perform this. You can for example specify a common sell rule for both signals and then update the order type using the "OnClosePosition" event of the money management script.

Here is a script that changes a (default) limit order (You should specify the limit order in the order settings: Sell using limit order at the price of hhv(250))

string symbol = Functions.GetPositionDetails().Symbol;
MMParser parser1 = Data.ParseFormula("a = close < sma(50);");
TimeSeries a = parser1.GetTimeSeries(symbol, "a");
if(a[0] == 1)
{
Functions.UpdateOrder(Orders.CloseMarketOrder());
}



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
Transform any order into a limit order selectively based on a tra...
Money Management System to Split Order Into Smaller Pieces
Analyst Rating (Yahoo Historical Buy/Sell Recommendations)
Yahoo Historical Buy/Sell Recommendations
Percentage of Bars a Trading rule Generates Buy/Sell Signals

How-to Lessons
How to set order type of a trading system programmatically
How to generate buy/sell signals from a trading system
How to automatically draw Fibonacci Retracement for each new stoc...
How to create a strategy-based portfolio
How to optimize a neural network using a genetic algorithm

Related Forum Threads
Late portfolio buy/sell signals
chart types
Script Trading Example
Advanced Money Management
any one make rule for macd

Blog Posts
Different periodicities and chart bar types in QuantShare Trading...
Synchronize Buy/Sell List of Rules in the Trading System Optimize...
Working with the formula editor
How to search for a trading item
Trend Following and Moving Averages









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 © 2012 QuantShare.com
Social Media
Follow us on Facebook
Twitter Follow us on Twitter
Google+
Follow us on Google+
RSS Trading Items