---
title: "Omais Ali (@omaisali) | Hashnode"
description: "Omais Ali (@omaisali) writes on Hashnode. Read their latest articles and follow their work."
url: "https://hashnode.com/@omaisali"
---

@omaisali

# Omais Ali

@omaisali · Joined October 2026

## Comments

[Good catch Arnold, thanks. You're right, with lastBar at 0 the first tick after attaching or restarting fires as a new bar even mid candle. The fix is to seed it in OnInit with lastBar = iTime(\_Symbol, \_Period, 0); so the EA waits for the next real bar open. Agreed on the restart comparison case too, I've added it to the checklist.](https://hashnode.com/posts/from-tradingview-strategy-to-mt5-expert-advisor-a-developer-s-checklist/6ac8f36430d4862710868954/comment/6ac9e7979712736ed962af4a#reply-6ac9f26ad085a8a2b08a2a37)

Reply · Article · Oct 10 · [From TradingView Strategy to MT5 Expert Advisor: A Developer's Checklist](https://hashnode.com/posts/from-tradingview-strategy-to-mt5-expert-advisor-a-developer-s-checklist/6ac8f36430d4862710868954)
