Gamestudio Links
Zorro Links
Newest Posts
loading historical data 1st time
by AndrewAMD. 04/14/23 12:54
Trade at bar open
by juanex. 04/13/23 19:43
Bug in Highpass2 filter
by rki. 04/13/23 09:54
Adding Limit Orders For IB
by scatters. 04/11/23 16:16
FisherN
by rki. 04/11/23 08:38
AUM Magazine
Latest Screens
SHADOW (2014)
DEAD TASTE
Tactics of World War I
Hecknex World
Who's Online Now
4 registered members (fogman, Grant, AndrewAMD, juanex), 989 guests, and 8 spiders.
Key: Admin, Global Mod, Mod
Newest Members
rki, FranzIII, indonesiae, The_Judge, storrealba
18919 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Setting stop loss/trail and so on. #418597
02/27/13 07:54
02/27/13 07:54
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Hi,

So, I know how to programme a simple stop loss. But the thing I want to do I'm not sure how. It says in the manual under trail: "The stop loss is increased in a long position, and decreased in a short position so that it normally follows the price at the distance given by the sum of the Stop and Trail distance".

What I want to do is to set out different levels at which I raise the stop. For example. When i reach 50 pips, move SL to BE, when i reach 150 pip, move SL to 100 pips profit, and so on.

And I'm not sure how to get this right, cause what I can read, there's no way doing it using trailslope, traillock and so on. I just want to get this simple things right. Where _I_ set out my levels at which my SL changes.

Ibra

Re: Setting stop loss/trail and so on. [Re: ibra] #418601
02/27/13 09:23
02/27/13 09:23
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
For stop management that is more complex than trailing, you need to write an individual trade function. Look in the manual under "Trade Parameters" how to individually manage a trade. There's also an example of a simple trade function that moves the stop loss to a certain level.

A simple trick to move SL to BE when 50 pips are reached is setting Trail to 50 pips and TrailLock to 1. Anything more complex however requires a trade function.

Re: Setting stop loss/trail and so on. [Re: jcl] #418770
03/01/13 10:35
03/01/13 10:35
Joined: Jan 2013
Posts: 68
I
ibra Offline OP
Junior Member
ibra  Offline OP
Junior Member
I

Joined: Jan 2013
Posts: 68
Hi jcl,

Thanks for your reply. I'll look into that.

Have a nice weekend.

Re: Setting stop loss/trail and so on. [Re: ibra] #419505
03/11/13 06:19
03/11/13 06:19
Joined: Nov 2012
Posts: 209
S
SFF Offline
Member
SFF  Offline
Member
S

Joined: Nov 2012
Posts: 209
It seems that Stop and TakeProfit var is static and only when the trade was entered it was set.

How can I modify those var on every bar or when a condition is met?
Need to use another var - Trail?

Last edited by SFF; 03/11/13 11:28.
Re: Setting stop loss/trail and so on. [Re: SFF] #419529
03/11/13 12:28
03/11/13 12:28
Joined: Jul 2000
Posts: 27,935
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,935
Frankfurt
Stop, Takeprofit and Trail are described on the manual, but also in much better detail in the broker's introduction to trading. Every broker has such an introductory tutorial, and that is probably the best way to lean how a stop loss, profit target, and trail distance works.

For moving an existing stop or profit target to a different price, use the exitLong/Short functions - look at the example under "Tips & Tricks".


Moderated by  Petra 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1