there is a question posted here:
http://www.elitetrader.com/vb/showthrea ... did=151193
How to set a price stop (instead of a $dollar amount or a trailing stop).
I would like to know the answer as well.
can someone help?
setting a price stop
- TJ
- Posts: 7743
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2222 times
if Marketpositoin=1 then Value1=H[BarsSinceEntry +1];
if Marketposition=1 then sell next bar at Value1 stop;
if Marketposition=-1 then Value1=L[BarsSinceEntry +1];
if Marketposition=-1 then buytocover next bar at Value1 stop;
Hope it works
Regards
Super
if Marketposition=1 then sell next bar at Value1 stop;
if Marketposition=-1 then Value1=L[BarsSinceEntry +1];
if Marketposition=-1 then buytocover next bar at Value1 stop;
Hope it works
Regards
Super
Last edited by SUPER on 21 Jan 2009, edited 1 time in total.
- Marina Pashkova
- Posts: 2758
- Joined: 27 Jul 2007
Re: setting a price stop
Hi TJ,there is a question posted here:
http://www.elitetrader.com/vb/showthrea ... did=151193
How to set a price stop (instead of a $dollar amount or a trailing stop).
I would like to know the answer as well.
can someone help?
If you are talking abour a regular stop order, the syntax should be as follows:
---------------------------------
sell next bar at <price> stop;
---------------------------------
or you can also use a setstoploss:
---------------------------------
setstoploss(5*pointvalue);
---------------------------------
As for the question posted on EliteTrader, it's not quite clear what the trader wants to do exactly. He is talking about a stoploss for a short position. But the entry can be higher than 'high of the bar previous to the bar i sold'.
Finally, if there is a specific price (in his case 'high of the bar previous to the bar i sold) and this price has been remembered in var, a stoploss for a short position can be set using the following command:
----------------------------------
setstopcontract;
setstoploss(var-entryprice);
----------------------------------
Hope the above helps.
Regards.