Hello,
I tried, but I confess I'm not uderstanding why I´m being unsuccessfull yet. So, please, could you teach me some way, through the rules wizard, that I could set a specific time inside the day so that I exit from all positions?
Thank you for your attencion,
Regards,
Alexandre
Size:
Color:
Hi,
There's a rule called "Intraday Rule: Time is later (earlier) than HHmm" under Date/Time conditions which should get the job done.
Size:
Color:
Hi Eugene, I have the same question.
This rule is not working for me correctly .I keep seeing trades before 10am.
Below is my script, I will be very grateful if you can help me!!
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
...that I could set a specific time inside the day so that I exit from all positions?
You applied the time condition to the entry logic.
If you're using the Strategy Builder, add a SellAtMarket order and move the time condition to it.
As for trades bought or shorted before 10am, I'd have to say that it's "impossible" using the code above.
Size:
Color:
Thank you Cone!
If I understand correctly, I can't use this rule to buy or shortl after 10am, in this case, the second bar of the day?
Size:
Color:
Diego, I think there's a misunderstanding. Robert responded to Alexandre's (topic starter) post looking at your code. But despite you saying "I have the same question", that's incorrect. In fact you're trying to
enter after 10:00am whereas topic starter's task was about
exiting at a given time.
QUOTE:
I keep seeing trades before 10am.
Right, if a signal took place at the last bar of the day (e.g. 11:00pm for an instrument that trades round the clock) you will see a trade on the next bar (e.g. 12:00am next day). Formally it's correct. Anyway, you should add another condition preventing the entry
after some time e.g.
CODE:
Please log in to see this code.
Size:
Color:
QUOTE:
Robert responded to Alexandre's (topic starter) post looking at your code.
Whoops!
Size:
Color:
Eugene,
sorry for the misunderstanding and thanks for your help!
I was imagining that it would be related to the closing of the previous day.
I will add this code!
Size:
Color:
Don't worry about it. You're welcome.
QUOTE:
I will add this code!
In case it wasn't obvious from my reply, you can also add a second "Intraday Rule: Time is later (earlier) than HHmm" condition - one for "later" (than 10:00) and the other for "earlier" (than 16:00, 23:00 or whatever).
Size:
Color: