Update an old tick indicator

MQL4 Indicators

Specification

if you know how to use chatgpt or others it will be simple

you just have to change the way of working in tick of the old version indicator in price movement



int start() 

{

   double currentPrice = SymbolInfoDouble(_Symbol, SYMBOL_BID);

   static double prevPrice = 0;

   static int upCount = 0;

   static int downCount = 0;

   static datetime lastUpdate = 0;

   static bool isFirstBar = true;

   

   // Initialize on first bar

   if (isFirstBar)

   {

      prevPrice = currentPrice;

      isFirstBar = false;

      lastUpdate = Time[0];

   }

   

   // Calculate price movements

   if (Time[0] != lastUpdate)

   {

      double priceChange = currentPrice - prevPrice;

      

      // Update movement counters

      if (priceChange > 0)

         upCount++;

      else if (priceChange < 0)

         downCount++;

      

      // Calculate movement speeds

      double upSpeed = (double)upCount / Period;

      double downSpeed = (double)downCount / Period;

      

      // Update buffers

      FastBuffer[0] = upSpeed;

      SlowBuffer[0] = downSpeed;

      

      // Reset for new period

      upCount = 0;

      downCount = 0;

      prevPrice = currentPrice;

      lastUpdate = Time[0];

   }

   

   return(0);

}


// Replace tick-based parameters with price movement parameters

extern string Block1="--- Price Movement Parameters ---";

extern double PriceThreshold = 0.1;    // Minimum price change to count as movement

extern int FastPeriod = 10;            // Number of bars for fast calculation

extern int SlowPeriod = 40;            // Number of bars for slow calculation



int init() 

{

   int i=0;

   SetIndexBuffer(i++, FastBuffer);    // Upward movement speed

   SetIndexBuffer(i++, SlowBuffer);    // Downward movement speed

   SetIndexEmptyValue(i, EMPTY_VALUE);

   

   // Set appropriate scale for price movements

   IndicatorSetDouble(INDICATOR_MINIMUM, 0);

   IndicatorSetDouble(INDICATOR_MAXIMUM, 100);

   

   return(INIT_SUCCEEDED);

}


if you think you can copy paste the new code,, write to me

Thanks!!


Responded

1
Developer 1
Rating
(6)
Projects
4
0%
Arbitration
0
Overdue
0
Free
2
Developer 2
Rating
Projects
0
0%
Arbitration
2
0% / 50%
Overdue
0
Working
3
Developer 3
Rating
(7)
Projects
6
33%
Arbitration
4
0% / 50%
Overdue
0
Free
4
Developer 4
Rating
(27)
Projects
36
25%
Arbitration
1
0% / 0%
Overdue
4
11%
Working
5
Developer 5
Rating
(535)
Projects
613
34%
Arbitration
34
38% / 47%
Overdue
9
1%
Busy
Similar orders
1. Project Overview Name : BB Channel Trading EA Objective : Execute reversal trades based on price action (engulfing patterns and liquidity sweeps) at the extremes defined by Bollinger Bands. Trades will be taken when price breaks volatility bounds, indicating potential exhaustion and reversal. 2. Functional Components 2.1 Bollinger Bands Channel Purpose : Identify overbought and oversold zones. Indicator : Custom
Hey there, I’m looking to get a custom NinjaTrader indicator/plugin/tool developed. It’s very similar to Riley Coleman’s “Candlestick Trader” indicator (you can see a walkthrough of it in this YouTube video at timestamp 6:52: https://www.youtube.com/watch?v=NjCUZveXtLo&amp ;t=303s ). Please take a look at that video for reference, as I’d like most of the core features replicated. To summarize, the key functions I
Requirement 1: Name - Template Blue/Grey v1.0 I need a template for MT5 and TradingView Charts. The coloring should look exactly similar to the attached screenshot. ============================================================== Requirement 2: For the below, coloring from Requirement 1 should be followed. Name - Candle Imbalance Detector v1.0 I need an indicator that can detect an imbalance candles on the chart. This
Hi, I have an EA, which places limit order by reading the text file. EURJPY, SELL, 171.74263, 171.80196, 29/08/2025, 16:15, 29/08/2025, 17:15, 0.05932, 171.59432, 1.24 The above one is the format of the text file which the EA reads/ BIAS PRICE SL PRICE CREATE DATE CREATE TIME EXPIRY DATE EXPIRY TIME SL PIPS TP LOT SIZE Now, I am in need of another variable named: Delete Price This will be the next one in the same
Здравствуйте! Требуется интегрировать свою стратегию, основанную на индикаторе KST (KNOW SURE THING), в торгового бота, купленного на criptorobotics.Также необходимо проверить стратегию на исторических данных. Ответ от criptorobotics ... " ...если у вас есть своя стратегия на TradingView или в любой другой системе, вы можете создать на нашей платформе собственного робота за пару минут и отправлять в него сигналы по
I have a indicator and want EA bot which can take buy and sell order and manage risk of 1% in end of the day and I want to set profit targets also but I want this mainly for prop firms account so risk management and money management are the main factors
Job Title: MQL4 Developer Needed – EA Editing & Licensing (Ongoing Partnership) Description: I’m looking for an experienced MQL4 developer to work with me on an ongoing basis. I already have multiple EAs and I need someone who can: Add a licensing system (account/expiry restrictions, etc.) Edit and improve existing EAs based on my requirements Provide reliable, ongoing support for future projects I’m offering access
A coder with experience in Coding indicator to ea and fixing telegram bot message The EA has two indicators installed with two strategy for open trade This will be explained in the document that will be provided The task in summary Remove two of the indicator and replace it with Two indicators i will provide Now we will have three optional indicators installed for opening trade The telegram work initially but i need
I am looking for an experienced Pine Script developer to fix several specific bugs in a, custom TradingView indicator. The core logic of the indicator is already built, but it has a few functional issues that need to be resolved
Hey, I need someone to troubleshoot and fix my current Breakout EA. Shouldn't take too long to fix, work ist mostly already done. The strategy is clear and simple, but some things don't work like they should: - Optimization / Backtesting problems, trades are not closing as they are supposed to at their desired time - Check my inbuilt Randomization features (I doubt they are working correctly) - Info Panel needs some

Project information

Budget
35+ USD
For the developer
31.5 USD