This is a beautiful trading bot, but all of a sudden stopped working (not placing trades). Anyone skillful with coding and might possibly figure out what the heck happened? I’ll send you the entire bot so you’ll always have it. I don’t know coding.
If this bot is gonna buy me a lambo… I got you!
I’ll take a look at it and see if I can find the issue, if you like. I’ve been creating and converting a bunch of indicators and strategies lately, so hopefully I can figure this one out. It’s strange that it would work for a while, but then stop.
Seems to be working… Didn’t test playback, but it looks like it doesn’t take many trades. Whoever coded this…
Well cool it’s working for you. Why the H did it quit taking trades lately on MY platform?? Worked okay for 3-4 weeks. WTH??
Considering that it takes 1 to 2 trades… maybe there weren’t any entries that triggered? Try to backtest those days to see if it takes any trades. If it does, then try replaying those days to see if it’s taking it.
I’ve had it up full time and the last trade it did was August 25. Prior to that it was doing an average of 8-10 trades per day.
That doesn’t seem right. I literally copy and paste what you had on a one minute chart and barely got trades. Did you do any modifications to it? Take what you have above and replace what you have in NinjaTrader to see if you get the same results as you have now. I also tested on NQ, so I don’t have ES/MES data. Do you notice any errors on NinjaScript Output when you noticed that it stopped trading?
re: Do you notice any errors on NinjaScript Output when you noticed that it stopped trading?
No, no errors, it just stopped making trades. (But just to mention, it never did make trades every few minutes. Like I say, about 8-10 every 24 hours.)
re: Did you do any modifications to it?
No actual modifations. I don’t know coding well enough to even try that. I did do some specific settings on the parameters. I’ll attach screenshots of my settings.
Those look like the default settings even though it seems that you are implying you updated the settings. Also, does it not take any trades at all or does it stop after lets say a trade or two? Is the strategy disabling by itself? Did you switch from sim to live and now live doesn’t work?
It’s taking trades for me in backtesting with the default settings (same as what you show). It’s using two fixed timeframes in the code, 1min and 15min, so the timeframe on your chart won’t really affect how many trades per day it takes. It’s giving me about 0.8 trades per day in a year of backtesting on MES.
There are some settings for your NinjaTrader account itself that can prevent trades from happening. Have you adjusted any settings on their website? I know there’s one that sets an account-wide max daily loss, and if set to zero it will just cancel all trades.
There are a couple ways within the strategy settings that you could prevent it from trading, like unchecking “trade” at the top, or setting time restrictions that don’t make sense. With the settings in your screenshot you shouldn’t be having those problems though.
Will other strategies take trades when you run them? Does the magnum strategy take trades for you in backtesting? Are you running another strategy on the same instrument at the same time you’re running magnum?
Looking at it again, I’m seeing errors in the output log along the lines of “an order has been ignored since the stop price [some number] near the bar stamped [some date] is invalid based on the price range of the bar. This is an invalid order and subsequent orders may also be ignored.”
I think it’s trying to set stop loss levels based on the 15 minute timeframe, but since it’s really trading on the 1 minute timeframe the stop might no longer be valid, so it aborts the order.
I also see that it sometimes doesn’t find a setup for extended periods. I tried it on MNQ, and there’s one period of about 70 days where it took zero trades.
What you’re seeing is probably a combination of these issues. I’ll poke at it some more soon and see if I can improve it. The win percentage looks good, when it is trading.
re: look like the default settings
Yes you’re right, my bad. I should have screenshot the settings I am using, the ones the seller recommended. But there are actually only a couple of differences.
The settings I’m using:
Runner TP: 100
GAIN turn off: 1000
LOSS turn off: 1000
The only other difference is the Timers are all unchecked.
Everything else I have at default.
re: take any trades at all or does it stop after lets say a trade or two?
NO trades at all past August 25.
re: strategy disabling by itself?
Yeah apparently. Just quit taking trades after 8/25.
re: live?
I’ve never gone live, only sim.
That seems right. It’s referencing the 15 minute for the stop and is no longer valid on the 1 minute. I don’t have any issues running other strategies. Seems like it’s probably not finding entries.
re: the default settings:
Like I told WaleeTheRobot, I screwed up a bit on the screenshots, I shoulda brought up my settings I put them at. Not much different from default though.
The settings I’m using:
Runner TP: 100
GAIN turn off: 1000
LOSS turn off: 1000
The only other difference is the Timers are all unchecked.
Everything else I have at default.
But, as I say, no trades have happened past Aug 25.
re: some settings for your NinjaTrader account…can prevent trades from happening. Have you adjusted any settings on their website?
No I haven’t changed anything. But as per your point, I will call Support tomorrow and check into that. You might for sure be onto something there!
re: Will other strategies take trades when you run them?
Yeah others work okay.
re: Does the magnum strategy take trades for you in backtesting?
Haven’t tried backtesting. Although, if it does then what would that tell us?
re: Are you running another strategy on the same instrument at the same time you’re running magnum?
Nope
re: MNQ…70 days where it took zero trades.
Wow. Not good to hear.
re: output log errors…an order has been ignored…invalid based on the price range of the bar…invalid order subsequent orders may also be ignored…trying to set stop loss levels based on 15 minute timeframe, but since it’s really trading on the 1 minute timeframe the stop might no longer be valid, so it aborts the order.
Well THAT could be significant. (!!!) You might for sure be onto to something here. I never noticed that.
re: I’ll poke at it some more soon and see if I can improve it. The win percentage looks good, when it is trading.
Yes I think Magnum has a GREAT potential - once this problem(s) is solved. Also tweaking to the optimum on all the parameters.
re: referencing the 15 minute for the stop and is no longer valid on the 1 minute.
So how approach this issue? Is there a conflict with time frames in the strategy settings vs the chart time setting? Anything like that?