I have a fixed stoploss in my strategy. I do this with:
SetStoploss(400). However At one point i want to set the system to breakeven + 1 point. This is no longer a stop loss, since it will no be < 0.
How can i set this order at the broker ?
Adjust stop loss with setstoploss
-
- Posts: 74
- Joined: 25 Aug 2007
- Been thanked: 6 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Adjust stop loss with setstoploss
do you mean a trailing stop?I have a fixed stoploss in my strategy. I do this with:
SetStoploss(400). However At one point i want to set the system to breakeven + 1 point. This is no longer a stop loss, since it will no be < 0.
How can i set this order at the broker ?
-
- Posts: 74
- Joined: 25 Aug 2007
- Been thanked: 6 times
Re: Adjust stop loss with setstoploss
No I'm trying to use the setbreakeven command in multicharts 7.2 beta.
But it does not seem to work.
But it does not seem to work.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Adjust stop loss with setstoploss
what do you mean by "it does not seem to work"?No I'm trying to use the setbreakeven command in multicharts 7.2 beta.
But it does not seem to work.
if you want specific help, you have to be more detailed.
eg. describe your intention, post your code, post your flowchart,
a diagram or a chart always helps to illustrate your situation.
-
- Posts: 74
- Joined: 25 Aug 2007
- Been thanked: 6 times
Re: Adjust stop loss with setstoploss
My code is:
if marketposition <> 0 then
if openpositionprofit >= (ChandelierStopPercentage / 100) * (MyStopProfit) then
setbreakeven(Mybreakeven);
It does not work. The ChandelierStopPercentage is u number between 1 and 100. Mystopprofit is in Dollars and also a user input variable to the study. On no charts whatever the ChandelierStopPercentage the Setbreakeven is executed
if marketposition <> 0 then
if openpositionprofit >= (ChandelierStopPercentage / 100) * (MyStopProfit) then
setbreakeven(Mybreakeven);
It does not work. The ChandelierStopPercentage is u number between 1 and 100. Mystopprofit is in Dollars and also a user input variable to the study. On no charts whatever the ChandelierStopPercentage the Setbreakeven is executed
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Adjust stop loss with setstoploss
see post #3My code is:
if marketposition <> 0 then
if openpositionprofit >= (ChandelierStopPercentage / 100) * (MyStopProfit) then
setbreakeven(Mybreakeven);
It does not work. The ChandelierStopPercentage is u number between 1 and 100. Mystopprofit is in Dollars and also a user input variable to the study. On no charts whatever the ChandelierStopPercentage the Setbreakeven is executed
viewtopic.php?f=16&t=6929
-
- Posts: 74
- Joined: 25 Aug 2007
- Been thanked: 6 times
Re: Adjust stop loss with setstoploss
Setbreakeven does not make any sense to do it not conditionally, since it would be set immeadiatly, something you only want conditionally.
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Adjust stop loss with setstoploss
read the manual again, it is a short section, it wouldn't take much trouble.Setbreakeven does not make any sense to do it not conditionally, since it would be set immeadiatly, something you only want conditionally.
-
- Posts: 74
- Joined: 25 Aug 2007
- Been thanked: 6 times
- TJ
- Posts: 7745
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2224 times
Re: Adjust stop loss with setstoploss
real man don't lose money either.Will do, but you know real man don't read manuals
ps. alternatively you can read what I wrote in the link above. It should be sufficient to tide you over.