Gamestudio Links
Zorro Links
Newest Posts
MT5 bridge not working on MT5 v. 5 build 4160
by EternallyCurious. 04/25/24 20:49
Data from CSV not parsed correctly
by EternallyCurious. 04/25/24 10:20
Trading Journey
by howardR. 04/24/24 20:04
M1 Oversampling
by Petra. 04/24/24 10:34
Zorro FIX plugin - Experimental
by flink. 04/21/24 07:12
Scripts not found
by juergen_wue. 04/20/24 18:51
zorro 64bit command line support
by 7th_zorro. 04/20/24 10:06
StartWeek not working as it should
by jcl. 04/20/24 08:38
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
0 registered members (), 715 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Mega_Rod, EternallyCurious, howardR, 11honza11, ccorrea
19048 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 7 of 7 1 2 3 4 5 6 7
Re: Pre-Market Volatility [Re: Sundance] #427299
08/06/13 14:24
08/06/13 14:24
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
Hi Sundance,

My understanding is that intra-bar, (f.i., a TMF being called at every tick) the close price is the current price, and H & L are bar-to-date.

Also, if you use BarOffset there can certainly be a H1 bar at 12:45... laugh

Re: Pre-Market Volatility [Re: DdlV] #427304
08/06/13 14:49
08/06/13 14:49
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
DdlV,

Intrabar when a tmf is running on a tick by tick basis, can we use 0 as a reference to the currently forming bar for all purposes?

and the last fully closed bar is now referenced as bar 1 even though it would have been bar 0 when the script last ran?

Re: Pre-Market Volatility [Re: swingtraderkk] #427306
08/06/13 14:53
08/06/13 14:53
Joined: Jul 2000
Posts: 27,982
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,982
Frankfurt
Yes, inside a TMF the current bar is incomplete, and priceClose() is just the current price. As soon as the bar is complete, the run function is executed and then the next bar begins. So the run function can never run at 12:45 in the example, but a TMF could.

Re: Pre-Market Volatility [Re: jcl] #427321
08/06/13 17:20
08/06/13 17:20
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
jcl,

Code:
Trade management functions run at every tick, which implies some restrictions. Indicators that create data series can not be called in a TMF; other indicators can be called. The current candle is incomplete, so its range and height is smaller than the other candles; and the last full candle has the index 1, not 0. The price functions can be called, but make no much sense for the current bar because the open, high, or low prices are in relation to the bar boundary. Use TradePriceOpen or TradePriceClose for evaluating the current price of the asset.



I really thought I'd read this part of the manual before!!!

Re: Pre-Market Volatility [Re: swingtraderkk] #427326
08/06/13 18:55
08/06/13 18:55
Joined: May 2013
Posts: 627
Bonn
Sundance Offline
User
Sundance  Offline
User

Joined: May 2013
Posts: 627
Bonn
Ah. that is what i meant. The close price of bar 0 is then the actual price. Okay. Getting closer.
Its not really that easy to understand jcl. Thanks for your patience.

Re: Pre-Market Volatility [Re: Sundance] #427327
08/06/13 19:01
08/06/13 19:01

A
acidburn
Unregistered
acidburn
Unregistered
A



Originally Posted By: Sundance
Its not really that easy to understand jcl. Thanks for your patience.


Yeah, a sizable amount of little details one has to remember, no other way. I've read the whole manual (whole =~ 80%) at least two times, and I'll have to do it again, probably as soon as 1.14 is released.

Re: Pre-Market Volatility [Re: Sundance] #427328
08/06/13 19:03
08/06/13 19:03
Joined: Jun 2013
Posts: 1,609
D
DdlV Offline
Serious User
DdlV  Offline
Serious User
D

Joined: Jun 2013
Posts: 1,609
swingtraderkk, jcl's post answered your questions, right?

Re: Pre-Market Volatility [Re: DdlV] #427334
08/06/13 19:48
08/06/13 19:48
Joined: May 2013
Posts: 245
S
swingtraderkk Offline
Member
swingtraderkk  Offline
Member
S

Joined: May 2013
Posts: 245
yes I'm clear thanks to all on the bar numbers - at last!

I was confused thinking how to use indicators etc. in a trade management function, but you are limited to what you can access.

I very strongly suggest that anyone (re)reads the trade management chapter in the manual.

Page 7 of 7 1 2 3 4 5 6 7

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