Hello Traders
South Africa trade starts at 083000
I’d like to use the ‘Open’ at that specific time as a parameter within my code.
(Much like the DOpen, Kind of creating my own DOpen)
How do I do that?
Thanks for your advise.
I’m not sure what you mean by your own DOpen (Dopen() is used to get the price of a previous daily open) but I’m guessing you want this?
// No positions will open before this time so only at or after this time but make sure you have the time zone on the platform to South Africa and that this code is at the beginning of your system
DEFPARAM FlatBefore = 083000
// Close all positions and don’t open any positions after
//DEFPARAM Flatafter = ??????
If that’s not what you’re after maybe a more specific example would help.
Hi dwgfx
Thank for your comment.
What I want to achieve is to create a ‘constant variable’ based on the ‘Open’ value of the candlestick at the exact time of 083000
Thanks,
A.
I came up with this:
Once DayOpeningValue = 0
IF time = 083000 THEN
DayOpeningValue = Open
ELSE
DayOpeningValue = DayOpeningValue
..Your code here..
ENDIF
But maybe there is a better way of coding..?