Gamestudio Links
Zorro Links
Newest Posts
Trading Journey
by howardR. 04/28/24 09:55
basik85278
by basik85278. 04/28/24 08:56
Zorro Trader GPT
by TipmyPip. 04/27/24 13:50
Help with plotting multiple ZigZag
by M_D. 04/26/24 20:03
Data from CSV not parsed correctly
by jcl. 04/26/24 11:18
M1 Oversampling
by jcl. 04/26/24 11:12
Why Zorro supports up to 72 cores?
by jcl. 04/26/24 11:09
Eigenwerbung
by jcl. 04/26/24 11:08
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, Quad), 748 guests, and 6 spiders.
Key: Admin, Global Mod, Mod
Newest Members
wandaluciaia, Mega_Rod, EternallyCurious, howardR, 11honza11
19049 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Enterlong with Limit Order #482435
02/05/21 06:53
02/05/21 06:53
Joined: Feb 2021
Posts: 3
PETERSFIELD
N
NickL Offline OP
Guest
NickL  Offline OP
Guest
N

Joined: Feb 2021
Posts: 3
PETERSFIELD
Hi All,

I'm trying to do something very simple but failing to manage this:

1. Do a backtest
3. Enter a Limit Order below current bar close price

I've read the documentation and assume I need:

OrderLimit( 1000 ) ; // set the limit order price to 1000
enterLong(); // enter long with global trade parameters = order limit of 1000

However in a backtest, the trade just executes as a Market Order.

Thanks in advance,
Nick

Re: Enterlong with Limit Order [Re: NickL] #482437
02/05/21 11:30
02/05/21 11:30
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
OrderLimit establishes a limit to orders sent to brokers, if their API supports it. It has no effect on backtests.

https://manual.zorro-project.com/stop.htm

Re: Enterlong with Limit Order [Re: jcl] #482439
02/05/21 14:56
02/05/21 14:56
Joined: Feb 2021
Posts: 3
PETERSFIELD
N
NickL Offline OP
Guest
NickL  Offline OP
Guest
N

Joined: Feb 2021
Posts: 3
PETERSFIELD
Hi - JCL,

Thanks for your help - I did wonder if this might be the case, but good to confirm.

So does that mean there is no way to simulate a Limit order in a backtest?

Re: Enterlong with Limit Order [Re: NickL] #482451
02/08/21 11:42
02/08/21 11:42
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
If you want to backtest it, why not use pending trades instead?

Re: Enterlong with Limit Order [Re: NickL] #482459
02/09/21 06:05
02/09/21 06:05
Joined: Feb 2021
Posts: 3
PETERSFIELD
N
NickL Offline OP
Guest
NickL  Offline OP
Guest
N

Joined: Feb 2021
Posts: 3
PETERSFIELD
OK brilliant. Now I get it. You need to key in an EntryTime, followed by EnterLong with the limit price being the entry limit.


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1