Click here to Login





                                                   How can I build up an trailing stop limit buy order

  0

0
Christian
2017-02-20 11:08:18


If I am getting a signal from my strategie I want to activate an trailing stop limit buy order for a few days
and only if actual price is higher than the high from yesterday I want to go into the market.

Now I tried that code on my demo strategie, but I am getting no order?

Signal = sma(50) >= SMA(200); // Simple signal for testing
Buy = hhv(Signal , 10) == 1; //Signal is valid for a few days
buyprice(ref(high,1),1);
SetSimTiming(_Buy,_StopLimit,-1);

Here an example picture: https://drive.google.com/file/d/0B0z7bjnANzXTQ0l2Q3ZoQUk2YUk/view?usp=sharing





QuantShare
2017-02-21 03:13:11

  0

You are defining a stop limit order here. There is no built-in "trailing stop limit" order.
What you need to do is create a money management script and have the script update the stop limit order on each trading day depending on the previous high.



Christian
2017-02-21 09:46:49

  0

Hi Azouz,
please make me an offer for the descriped money managment script idea.
I need it for long and short orders an with two variables.
Fist "Distance in percent" and second "Number of valid days" (how many days the trailing is active).
Please add the coding to the existing script, see here: https://www.quantshare.com/item-1159-stop-mgmt-v-11
Regards
Christian





Stop Mgmt v 1.1 (by SystemTrade, 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
2017-02-22 03:29:33

  0

Hi Christian,

Please send a message to support at quantshare dot com for that and we will send you a quote.



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
Entry Trailing Stop V2
Entry Trailing Stop
Transform any order into a limit order selectively based on a tra...
Decreasing the Trailing Stop Level every Trading Bar
Conditional Trailing Stop Exit 2013-10-18

How-to Lessons
How to optimize the stop limit of a trading system
How to set order type of a trading system programmatically
How to create a volatility-based Stop - Dynamic stop based on the...
How to get trading orders from a portfolio programmatically
How to optimize the number of positions in a trading system

Related Forum Threads
How to create a Stop Limit
How can I build an Indicator, based on database data.
How can I associate a field (value) to a trade in a MM script?
Buy stop at high
Enter on Trailing Stop

Blog Posts
How to get buy and sell orders for a portfolio based on a trading...
Buy the best/top rated stocks or how to create powerful rank base...
How to build and backtest a robust stock trading system
How to create buy and sell trading rules based on News Data
Let me Show You How to Create Hundreds of Profitable Trading Syst...









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.