Gamestudio Links
Zorro Links
Newest Posts
How to install R ?
by Clifford_B. 10/16/19 18:05
Indices & metals easier to trade than FX???
by StefanCGN. 10/15/19 16:19
Can't plot daily high & low
by Zheka. 10/14/19 18:39
TWS "Market closed" fix
by jcl. 10/14/19 15:09
2xCapital slider to increase size
by jcl. 10/14/19 14:03
Imgui Lite-c Development
by txesmi. 10/13/19 09:40
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
10 registered members (Phrendo, AndrewAMD, Clifford_B, 3run, Dooley, sdh309795gaas, Superku, Shutch, kvm, 1 invisible), 625 guests, and 31 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Clifford_B, Paulius, Junker, FrankW, TedMar
18307 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Locking Profit #456050
11/07/15 08:47
11/07/15 08:47
Joined: Mar 2015
Posts: 334
Rogaland
N
Nanitek Offline OP
Senior Member
Nanitek  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 334
Rogaland
Hi

I want to lock the profit once it achieve a certain price level. But before this I do not want to trail in any way. I have tried many different ways but I can code it properly.
Any ideas?

Re: Locking Profit [Re: Nanitek] #456081
11/09/15 00:46
11/09/15 00:46
Joined: Apr 2014
Posts: 481
Sydney, Australia
B
boatman Offline
Senior Member
boatman  Offline
Senior Member
B

Joined: Apr 2014
Posts: 481
Sydney, Australia
Easy - adjust the stop level using a TMF when profit reaches your desired level.

Re: Locking Profit [Re: boatman] #456091
11/09/15 07:47
11/09/15 07:47
Joined: Mar 2015
Posts: 334
Rogaland
N
Nanitek Offline OP
Senior Member
Nanitek  Offline OP
Senior Member
N

Joined: Mar 2015
Posts: 334
Rogaland

Thanks. I will try to.
Something like:

Click to reveal..
int lock()
{
if( TradeIsOpen and TradePriceClose==Level )
TradeStopLimit = Level;
return 0;
}


What about using TradeTrailLock from that level if I did not define any trailing before? Is it enough just by writing Trail=0 ?

Re: Locking Profit [Re: Nanitek] #478028
08/27/19 19:48
08/27/19 19:48
Joined: Jul 2019
Posts: 26
M
maxwellreturn Offline
Newbie
maxwellreturn  Offline
Newbie
M

Joined: Jul 2019
Posts: 26
hey guys why if i use this TMF function for profit lock, nothing happen? where i am wrong? thank you

int lock()
{
if( TradeIsOpen && TradePriceClose==TradePriceOpen+30*PIP )
TradeStopLimit = TradePriceOpen+10*PIP;
plot("Stop",TradeStopLimit,MAIN,BLACK);
return 0;
}


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