Hello,
I want to put an order to my system about time. I want no entries after 18.30. Is there any code about this?
Thank you for your time.
Do you want active orders on market to be closed at the same time?
You can take a look at this post of mine https://www.prorealcode.com/topic/swing-hi-lo-dax-weekly-mtf/.
Line 27 determines when trading should be banned (line 26 is for forbidden days) and lines 30 and 37 use that condition to (or not) enter a trade.
Sorry Nicolas, you were faster!
My code open position at 16:30 and close this position at 22:00.
I would like, if there is not any position until 18:30 don´t open other position.
I found this ¨LimitEntryTime = 184000 //No Entries after this time¨ in this code
https://www.prorealcode.com/prorealtime-trading-strategies/grinder-eurusd-5-min-intraday-trading-strategy/?utm_source=ReviveOldPost&utm_medium=social&utm_campaign=ReviveOldPost.
But doesn΄t work. Please help me if you can.
Thank you for your time
The example you linked works perfectly, just change the time.
I change the time but doesn’t work. I have a syntax error message.
There is no syntax error, just use that variable.
You should post the whole code for me to analyze it.
My code starts with
DEFPARAM FlatAfter=220000
DEFPARAM FlatBefore=164500
This is the time that i want to work my program. If the program open a position until 18:30 will close the position at 22:30.
If the program doesn’t open a position until 18:30 i don’t want to open a position after 18:30. Is there any about this?
Yes, just mimick or copy what the code in the above links does!
robertogozzi thank you for your help. I solved the problem
Have a nice day.