Login Page - Create Account

Support Board


Date/Time: Wed, 25 Dec 2024 06:22:53 +0000



ACSIL: trailing by entry example please

View Count: 887

[2015-11-03 12:37:24]
User44052 - Posts: 34
Hello.

I've tried looking at the tradingsystem.cpp file, and tried applying the info on the documentation page (http://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#s_SCTradeOrder), but I still can't get my ACSIL code right. Can you please give me an example of how to construct the s_SCNewOrder to do the following.

A condition becomes true at price X, let's say a crossover (from above) happens at price X, and price is continuing to fall.
I want to buy as low as possible below X, so...
When my condition becomes true, I want to send a Trailing Stop Buy order.
I want to set it at 14 ticks above X.

In other words, if the crossover happens at X, and the price immediately starts going up, I want to be stopped into buying it at X+14 ticks.
Otherwise, if price continues to fall, I want the buy point to come down gradually.

Once I'm in long, I want the profit target to be 25 ticks, above the entry price (not above X).

From the documentation I understand that I need to build s_SCNewOrder as an attached order, but I've tried different combinations of ::Price1 and ::Target1Offet and ::AttachedOrderStop1Type, but I can't get it to work.

Please help with an example of what needs to be sent to create this order

NewOrder.Quantity = 1;
NewOrder.????;
NewOrder.????;


[2015-11-09 00:52:39]
Sierra Chart Engineering - Posts: 104368
Refer to the documentation here:
https://www.sierrachart.com/index.php?page=doc/doc_ACSILTrading.html#s_SCNewOrder

It should be quite clear that you need to specify the Order Type for the new order to a trailing stop order and also specify a Target1Offset for its Attached Order.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2015-11-09 00:53:30

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account