Gamestudio Links
Zorro Links
Newest Posts
How is this possible ? winning percentage 100%
by chsmac85
Today at 14:15
Asset capacity
by tuuPaul
Today at 13:48
New Zorro version 1.96
by jcl
Today at 13:13
Next contest?
by Michael_Schwarz
Today at 10:33
Help! 1.88.6 Crashes <5 minutes after clicking Trade!
by jcl
Today at 10:28
WFO
by jcl
Today at 10:27
TA-Lib not updated
by jcl
Today at 10:24
AUM Magazine
Latest Screens
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Evonet Beta v1.0 : Online Project Development Template
Lake scene
Who's Online
17 registered (Ayumi, alibaba, kvm, chsmac85, KadigunFx, CocaCola, HellThunder, Iglarion, 3 invisible), 466 Guests and 7 Spiders online.
Key: Admin, Global Mod, Mod
Newest Members
fandi, Deedee, avgtrader, aventador, gokhanuck
18103 Registered Users
Page 1 of 2 1 2 >
Topic Options
Rate This Topic
#474829 - 11/08/18 13:37 Efficiency on exit position
tradingest Offline
Member

Registered: 02/27/18
Posts: 178
Loc: Italy
Hi guys,

my function run() is execute on BarPeriod = 1.
Each minute the function check my gain or loss and when reach a value exit on position.
I want ot guarantee that the value.

For istance: target value = 120

1 run --> value 100
2 run --> 119
3 run --> 80

but between 2 and 4 run has reached 140.How can I exit before without change the BarPeriod = 1. Is it possible?

Thanks


Edited by tradingest (11/08/18 13:37)

Top
#474830 - 11/08/18 15:36 Re: Efficiency on exit position [Re: tradingest]
Dalla Offline
Senior Member

Registered: 02/24/17
Posts: 300
Use a TMF. It will be executed on every tick.
http://zorro-project.com/manual/en/trade.htm

Top
#474831 - 11/08/18 15:36 Re: Efficiency on exit position [Re: tradingest]
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 447
Loc: Chicago
A TMF runs on every tick. You can simulate it using the TICKS flag.

Or you can put your exit logic in tick().

Read these:
http://zorro-project.com/manual/en/trade.htm
http://zorro-project.com/manual/en/mode.htm#ticks
http://zorro-project.com/manual/en/tick.htm

Top
#474832 - 11/08/18 17:17 Re: Efficiency on exit position [Re: AndrewAMD]
tradingest Offline
Member

Registered: 02/27/18
Posts: 178
Loc: Italy
thanks so much AndrewAMD

so, this means that also my strategy run each 1 min I can exit each tick with TMF function?

Top
#474833 - 11/08/18 17:21 Re: Efficiency on exit position [Re: tradingest]
Dalla Offline
Senior Member

Registered: 02/24/17
Posts: 300
As long as you get tick data from your broker, yes

Top
#474835 - 11/08/18 20:13 Re: Efficiency on exit position [Re: Dalla]
tradingest Offline
Member

Registered: 02/27/18
Posts: 178
Loc: Italy
thanks so much for the support.

TMF working with tick I guess that this functions works in live trading and is not possible to test. Is it correct?

Top
#474836 - 11/08/18 20:33 Re: Efficiency on exit position [Re: tradingest]
AndrewAMD Offline
Senior Member

Registered: 02/21/17
Posts: 447
Loc: Chicago
Use the TICKS flag.

Top
#474837 - 11/08/18 20:36 Re: Efficiency on exit position [Re: AndrewAMD]
tradingest Offline
Member

Registered: 02/27/18
Posts: 178
Loc: Italy
Originally Posted By: AndrewAMD
Use the TICKS flag.


So, with flag works also within backtest?

I insert the flag in the function run(), is it correct?
Code:
set(TICKS);



fantastic!!

thanks again


Edited by tradingest (11/08/18 23:15)

Top
#474838 - 11/08/18 23:10 Re: Efficiency on exit position [Re: tradingest]
Dalla Offline
Senior Member

Registered: 02/24/17
Posts: 300
For backtesting the same applies as above. If you have tick data (T1 files) and set TICKS flag), then the tmf will run on every tick.

Top
#474862 - 11/09/18 19:44 Re: Efficiency on exit position [Re: Dalla]
tradingest Offline
Member

Registered: 02/27/18
Posts: 178
Loc: Italy
Hi Dalla,

thank for your support. I try to set set(TICKS) but in real when the position reach the amount that I want the position doesn't close.

Why? What I miss?

I setting the TICKS in function run() with BarPeriod = 1.

Can you help me with an example or with the code that I must write in my script?

Top
Page 1 of 2 1 2 >



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

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