Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Hi I have a strategy that I want you to make me a purchase at a specific minute and second hour.
Could you tell me what the correct code to insert into NinjaScript? If you are now 13:25:45 sec and you make me want to purchase at 13:38:14 sec, what would be the correct code?
Thanks and regards.
Can you help answer these questions from other members on NexusFi?
1. the most correct is with a on time event, that triggers exactly at that time
2. you can check on every incoming tick, if the time has arrived, the disadvantage
is in iliquid market, the order will be trigger after that time, after the first trade
Thanks Ron, for your help.
The truth is that the strategy makes you just need to run the second, for example at 12:21:17 sec
With the template you sent me I get no place think of it, could you tell me how it should be placed correctly with the data I have in my strategy? This is what I have.
The problem with your code is that it will only check when a new bar is formed.
you are subscribing the even 'onBarUpdate'
You could alternatively also subscribe the onMarketUpdate, that means your
code would then be check for every change in the bid/ask or any trade, at that
moment, you simple check the current time and if necessary fired an order
Ok thanks Ron,
but then My TimeSpan is the time I will introduce, where I have to tell the program if MyTimeSpan time = current time to do my operation?
It is possible to check for a time (like 15 min before and after oil report on Wednesday)
Or you can check for duration since entry of the trade (too slow trade kill it
Both logic you can see in a BOT that i have published in the past for educational purposes:
It is possible to check for a time (like 15 min before and after oil report on Wednesday)
Or you can check for duration since entry of the trade (too slow trade kill it
Both logic you can see in a BOT that i have published in the past for educational purposes: