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)
I'm attempting to add a time restriction rule to my strategy, however it appears to be ignored by the strategy, which trades 24/5 now. Does anyone know what I am missing in the code? Any hint is welcome!
inputs:
// Time
StartTime (0930),
EndTime (2200);
Condition1 = Time >= StartTime and Time <= EndTime;
Thanks in advance,
FutureTrader112
Can you help answer these questions from other members on NexusFi?
the code snippet itself looks fine, and more information would be required for checking what might cause what you are seeing. How do implement the snippet into your actual code and what chart and timeframe do you apply the code to?
// Buy Signal
Condition1 = Time >= StartTime and Time <= EndTime;
Condition2 = (Indicator1> Indicator1[1]) and (0 > Indicator1[1]) and (Open < AvgExp);
if Condition1 and Condition2 then
Buy ("Buy") next bar at market;
what exactly do you mean when you say "it appears to be ignored by the strategy"? Please describe what happens (screenshots might be helpful here) and what you want the strategy to do instead.
After I put the time constraints, it was ignored. Trades continue to occur before and after the timestamps specified in the code. I just want to make sure the strategy doesnt trade before 0930 and after 2200.