Gamestudio Links
Zorro Links
Newest Posts
Help with plotting multiple ZigZag
by degenerate_762. 04/30/24 23:23
M1 Oversampling
by 11honza11. 04/30/24 08:16
Trading Journey
by howardR. 04/28/24 09:55
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
4 registered members (7th_zorro, degenerate_762, AndrewAMD, ozgur), 774 guests, and 0 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Trying to make the TradeTrailLock work #455136
10/10/15 22:36
10/10/15 22:36
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Hi

I have developed a TMF function where if the price reaches a certain value then the TradeStopLimit is set a bit bellow that value and it works.
However, I want to add that once a value is reached the Profit is lock so I have used TradeTrailLock but I cant make it work. I tried to plot the TradeTrailLock to see what is actually going on but I could not neither frown

My whole idea is like:

if the price is bellow A then do nothing
if the price is above A then use A as stop and follow the price curve so that an small reduction of the profit close the position.


Any ideas? laugh

Re: Trying to make the TradeTrailLock work [Re: nanotir] #455138
10/10/15 23:30
10/10/15 23:30
Joined: Apr 2014
Posts: 482
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 482
Sydney, Australia
If you post your script, it would make it a lot easier to help you out.

Have you set both the Stop and Trail variables? They are both required for TrailLock.

Re: Trying to make the TradeTrailLock work [Re: boatman] #455146
10/11/15 08:44
10/11/15 08:44
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
The script is a mess but I will get something from it in post it over here.

I did not set the Stop and Trail because I do not want to trail the price until I reach a certain price. I will try to set them from that point. Maybe so it will work

Re: Trying to make the TradeTrailLock work [Re: nanotir] #455196
10/13/15 00:12
10/13/15 00:12
Joined: Mar 2015
Posts: 336
Rogaland
N
nanotir Offline OP
Senior Member
nanotir  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 336
Rogaland
Maybe it could help if I know how the trailLock is calculated from the trail.
My problem is that I do not want to trail the price at all. Only when it reach a certain value.
So if I do not want the value trail to influence a trade I can write like Trail = 100*PIP; but then, when I use TrailLock=90; there is no effect at all. However if I write Trail = 4*PIP; then I can see an effect from TrailLock but if I write that trail then the trade is closed before I want. So this is my dilema. How to trail from a certain level and how to lock the profits from that level too?

Re: Trying to make the TradeTrailLock work [Re: nanotir] #460702
07/11/16 09:57
07/11/16 09:57
Joined: Jan 2016
Posts: 16
R
roshanbaba Offline
Newbie
roshanbaba  Offline
Newbie
R

Joined: Jan 2016
Posts: 16
i am also facing the same problem in the matter of trailing..cant make the traillock work ..

Re: Trying to make the TradeTrailLock work [Re: roshanbaba] #460708
07/11/16 12:31
07/11/16 12:31
Joined: Feb 2015
Posts: 652
Milano, Italy
M
MatPed Offline
User
MatPed  Offline
User
M

Joined: Feb 2015
Posts: 652
Milano, Italy
The easiest way is to create a TMF that does what you want. You can find examples in the manual at the end of the Trade Functions section. Sorry but I can not direct link it. The manual contains a lot of useful examples while is not the easiest to be navigated and searched.

HtH Ciao

Last edited by MatPed; 07/11/16 12:32.
Re: Trying to make the TradeTrailLock work [Re: MatPed] #460711
07/11/16 13:08
07/11/16 13:08
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
If you only want to lock profit when a certain level is reached, just set Trail and TrailLock accordingly. But for more complex tasks you need indeed a TMF.


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