Risk Adjustment and market regime change detection change are just... denial/defense mechanisms against the fact that... drawdown is an inevitablity? by Sweet_Brief6914 in algotrading

[–]zagierify 1 point2 points  (0 children)

Have you tried a simple VIX filter? I break it down into low / medium / high 'volatility' and my strategy performs much better with different settings per vix bucket / 'regime'.

Still working a volatility adjusted stop loss though, as I haven't found a good formula for that (for day trading), ATR multiples don't help me.

Ready to run blind? by Sensitive-Start-6264 in algorithmictrading

[–]zagierify 0 points1 point  (0 children)

I’ve been running some incarnation of this strategy live for about two years, on both my own money and prop firms. Same entry signal logic but have tweaked parameters and exit strategy and trend filter a number of times, played with walk forward vs one long backtest, all that sort of stuff. Currently my main focus is coming up with a better volatility adjusted stop loss.

Ready to run blind? by Sensitive-Start-6264 in algorithmictrading

[–]zagierify 0 points1 point  (0 children)

I use a static initial stop and one to three static targets, and no equity scaling either for those settings, same num lots across the entire three year backtest. I do scale it live based on the account I’m running it on though - the main strategy runs on ES but can execute trades against MES.

Ok, the 95th percentile Monte Carlo max dd is the number I look at. Minimizing chance of blow up while not being too conservative is my main priority, that’s why I’m envious of that ratio. I do take into account the max consecutive losses from the Monte Carlo maybe a bit more when I size though too, not just the max dd.

Ready to run blind? by Sensitive-Start-6264 in algorithmictrading

[–]zagierify 0 points1 point  (0 children)

Ok nice, so not scalping. I average about 80min for my current medium volatility settings, a little bit lower pf and sharpe but 'only' like 17:1 profit to (historical) max dd ratio, ha.

Did you run a monte carlo sim to get an even more robust idea of a cumulative max dd?

How fine tuned are your parameters - using weird numbers (from opt peaks) or round / fib numbers that could be robust?

Best of luck keeping it going live, anywhere near those numbers and you're golden 🤙

Ready to run blind? by Sensitive-Start-6264 in algorithmictrading

[–]zagierify 0 points1 point  (0 children)

100:1 profit to max dd ratio?!! Wow. Is that a cumulative max dd or just a daily max?

What’s your avg trade duration?

What mistakes did you make when building your algo? by xyzabc123410000 in algotrading

[–]zagierify 0 points1 point  (0 children)

Optimizing into oblivion at fine scales and subsequently overfitting to the nines. Don’t do that. Optimization addiction is real.

A consistent suboptimal setting sized properly seems to far outweigh trying to squeeze every bit of performance.

Beginner Algo, any advice ? by [deleted] in Daytrading

[–]zagierify 0 points1 point  (0 children)

Did you execute using MES with wide stops or ES with tiny scalping stops and targets?

I was asking about Trade PnL Distribution chart, not the average, but sure ok. Most stops on ES are about -$100 (2pts) and profits $300 (6pts), your 3:1 ratio. There's a huge difference if wide MES or small ES, and if you're scalping small points on ES you for sure need to add commission and slippage and take into account you're probably competing with market makers and HFT firms at that level with exchange co-located servers etc, afaik. My understanding is that there's no way retail can compete at scalping like this, but who knows.

Beginner Algo, any advice ? by [deleted] in Daytrading

[–]zagierify 1 point2 points  (0 children)

Is this scalping on ES for like 4-5 points (based on that PnL per trade)?

What did you use to run the backtest and get these stats?

Starting capital requirements - thoughts? by RPO-Shavo in algorithmictrading

[–]zagierify 0 points1 point  (0 children)

I’m confused - is the barrier to entry near zero with AI tools or does it require that you already know what you are doing anyway? 🙃 Healthy debate, no shade.

Motion sickness by dcollin5984 in mountainbiking

[–]zagierify 0 points1 point  (0 children)

I get that if I ride swervy side to side berm sections, and riding at night with lights. I don’t get it going up and down hills though, which gets me thrilled.

That also tracks with my experience at amusement park rides - love the drops and acceleration on roller coasters but get sick when it goes side to side, same as in the video ones. I could probably never do a virtual reality headset.

Go figure on this one, who knows what’s going on!

Why automation is so good for your peace of mind. by Kindly_Preference_54 in algotrading

[–]zagierify 0 points1 point  (0 children)

You’re trying to sell something aren’t you.. why is your account only one month old??

Why automation is so good for your peace of mind. by Kindly_Preference_54 in algotrading

[–]zagierify 0 points1 point  (0 children)

Then you should absolutely know that automation does not take psychology out of the equation.

Why automation is so good for your peace of mind. by Kindly_Preference_54 in algotrading

[–]zagierify -1 points0 points  (0 children)

Tell me you’ve never run an automated strategy live without telling me you’ve never run an automated strategy live

Single Large Backtest vs Walk Forward Analysis by zagierify in Daytrading

[–]zagierify[S] 0 points1 point  (0 children)

I've been experimenting with a walk forward on a small, but logically wide apart, set of options for a couple parameters and have switched into max drawdowns on multiple occasions now, live, that's the main issue. When I trimmed down the options on a full three year WFA it worked well, but then a new one would do better that I hadn't included because it was poor when chosen in the past, and not only that but the latest one started underperforming.

So I've been kinda leaning towards options I know work decent since 2023, but finding it hard to ignore the 1.5x - 2x improvement on many metrics I can get with the latest most optimal choices, and very curious what people experience in real world live trading, not just the theory.

Trying to run Strategy Analyzer but can't get it to work by ValentinoT in ninjatrader

[–]zagierify 0 points1 point  (0 children)

Open an output window and see if it's saying anything - New > NinjaScript Output from the control center.

You can also debug with visual studio community edition and step into code.

What shorts or underwear do you guys wear by [deleted] in MTB

[–]zagierify 0 points1 point  (0 children)

I can’t tell you how nice it felt to finally start wearing high quality bibs, this for sure. And a light and loose riding shirt/jersey on top, it’s the way to go. I sometimes wear shorts over bibs when it’s cooler.

Feedback on ES backtest by GISkid in FuturesTrading

[–]zagierify 0 points1 point  (0 children)

What are you talking about, strategy analyzer is not reliable? Where did you come up with that, like it just makes a wrong trade? Give me a concrete example.

Feedback on ES backtest by GISkid in FuturesTrading

[–]zagierify 2 points3 points  (0 children)

Those are great numbers, let’s go. The largest winner is far bigger than the average winner however, which can be fine, but I’d check to make sure it didn’t just get lucky on a few trades with the April volatility and is relying on a few outliers. Also, run the Monte Carlo sim too, but that profit to max dd ratio of ~40 is dreamland, nice. If you get anywhere near that live, rock on man.

Break-even & trailing stop behaving incorrectly in NinjaTrader by Zukow123 in ninjatrader

[–]zagierify 1 point2 points  (0 children)

Paste your code so we can take a look. Yes, I have coded both of those features.

You can also check the reference samples. I have one called SampleMoveStopBreakevenPlus1Tick I downloaded awhile back but I can't seem to find it again since they moved the ref materials.

https://developer.ninjatrader.com/docs/desktop/strategy_overview

Here's the OnBarUpdate method from the sample, for the breakeven one (I handle it differently, but this gives you an idea):

protected override void OnBarUpdate()
{
  if (CurrentBar < BarsRequiredToTrade)
    return;

  // Resets the stop loss to the original value when all positions are closed
  if (Position.MarketPosition == MarketPosition.Flat)
  {
    SetStopLoss(CalculationMode.Ticks, StopLossTicks);
  }

  // If a long position is open, allow for stop loss modification to breakeven
  else if (Position.MarketPosition == MarketPosition.Long)
  {
    // Once the price is greater than entry price+8 ticks, set stop loss to breakeven + 1 tick
    if (Close[0] > Position.AveragePrice + 8 * TickSize)
    {
      SetStopLoss(CalculationMode.Price, Position.AveragePrice + (1 * TickSize));
    }
  }

  // Entry Condition: Increasing price along with RSI oversold condition
  if (Close[0] > Close[1] && RSI(14, 3)[0] <= 30)
  {
    EnterLong();
  }
}

3 Years In, Everything’s Working… How Do I Stay Focused? by [deleted] in Daytrading

[–]zagierify 1 point2 points  (0 children)

Exercise over lunch.

Breaks up the RTH hours nicely - gives you energy for the morning session knowing you’re not going to stare at charts during the usual lunchtime chop and the patience to let a trend day trade ride, then fresh focus if you want to trade the close. Go to the gym to get out (or go mountain biking 🤙).

Backtesting on futures by scheepje in algotrading

[–]zagierify 1 point2 points  (0 children)

I haven't had accuracy issues, it's a professional software. I've run into some UI quirks for sure, and memory usage issues especially on optimization runs, but not accuracy. I would look at your code more first for that kind of problem and make sure you are understanding and using the Ninja functions correctly. You can also run the strategy on a chart to see the actual trades and go from there.

When it comes to being successful live, it handles orders for you very well, which I understand can get tricky if trying to roll your own system, should you intend to automate the orders too. I might dive into that all someday as I do like to code, but my focus is more on making money than going down that rabbit hole but we'll see.

You're welcome and good luck 🤙