Trend line code fixed and fucnting right

İş Gereklilikleri


void OnCalculate(const int rates_total,
                 const int prev_calculated,
                 const datetime &time[],
                 const double &open[],
                 const double &high[],
                 const double &low[],
                 const double &close[],
                 const long &tick_volume[],
                 const long &volume[],
                 const int &spread[]) (

  int begin = trendlinePeriod + 1;
  int end = rates_total - 1;
  
  for (int i = begin; i <= end; i++) {
    if (Close[i - 1] <= Close[i - trendlinePeriod]) {
      if (IsPriceOnTrendline(i - 1, 0.0) && IsPriceOnTrendline(i, -1.0) && Close[i] < prevClose - minPriceDiff) {
        trendline[i] = (Close[i - trendlinePeriod] - Close[i]) / trendlinePeriod;
        trendline_start_bar = i - trendlinePeriod;
        ColorSetIndex(trendline_start_bar + 4, downtrendColor);
      } else {
        trendline[i] = 0.0;
      }
    } else if (Close[i - 1] >= Close[i - trendlinePeriod]) {
      if (IsPriceOnTrendline(i - 1, 0.0) && IsPriceOnTrendline(i, 1.0) && Close[i] > prevClose + minPriceDiff) {
        trendline[i] = (Close[i] - Close[i - trendlinePeriod]) / trendlinePeriod;
        trendline_start_bar = i - trendlinePeriod;
        ColorSetIndex(trendline_start_bar + 4, uptrendColor);
      } else {
        trendline[i] = 0.0;
      }
    } else {
      trendline[i] = 0.0;
    }

    if (trendline[i] != 0.0) 
      int count = 1;
      for (int j = i + 1; j <= end && count < minPointsForExtendedTrendline; j++) {
        if (IsPriceOnTrendline(j, trendline[i])) {
          count++;
        }
      }
      if (count >= minPointsForExtendedTrendline)
        // Extend trendline logic goes here
      

      

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(136)
Projeler
159
23%
Arabuluculuk
5
0% / 60%
Süresi dolmuş
4
3%
Yüklendi
2
Geliştirici 2
Derecelendirme
(72)
Projeler
119
52%
Arabuluculuk
4
25% / 75%
Süresi dolmuş
18
15%
Serbest
3
Geliştirici 3
Derecelendirme
(38)
Projeler
40
25%
Arabuluculuk
20
15% / 75%
Süresi dolmuş
8
20%
Yüklendi
4
Geliştirici 4
Derecelendirme
(13)
Projeler
16
19%
Arabuluculuk
0
Süresi dolmuş
2
13%
Serbest
5
Geliştirici 5
Derecelendirme
(1)
Projeler
5
0%
Arabuluculuk
1
100% / 0%
Süresi dolmuş
2
40%
Serbest
6
Geliştirici 6
Derecelendirme
(253)
Projeler
406
38%
Arabuluculuk
84
43% / 19%
Süresi dolmuş
70
17%
Çalışıyor
7
Geliştirici 7
Derecelendirme
(66)
Projeler
143
34%
Arabuluculuk
10
10% / 60%
Süresi dolmuş
26
18%
Serbest
Benzer siparişler
I have an ex4 file and want too get source code from it 100 usd is the max i want to pay for it i dont know how long it will take but i can extend the time
CREATING A BOT FOR MT4 AND MT5 NOTE THAT MY BUDGET IS FOR BOTH MT4 AND MT5 PLATFORMS . AND BOTH SCENARIOS ARE TO BE IN ONE EA SCENARIO ONE Price must first touch the bands( the upper bands for a sell, the lower band for a buy) Wait for the oscillator to turn red or green Wait for the candle on which the oscillator changed color to close for trade to be opened SL by default should be placed at the very high of the
Hello expert developer, I am looking for a skilled and experienced developer to help me create an auto trading bot that integrates signals from three Telegram channels and automatically transcribes them onto MetaTrader 4 (MT4). The bot must be able to receive and process trading signals (opening/closing positions) from three specified Telegram channels. If you have expertise in developing such integrations and
hi. I hv a strategy on tradingview need to convert to MT4/MT5 expert advisor for algo trading. would like to add some tradingview strategy setting to the EA(not included in my tradingview code): recalculate after order is filled, order size: xx% of equity
HFT 100 - 200 USD
As soon as possible URGENTLY HFT the most profitable without any losses can make 50 to 100% daily that can work on XAUUSD GBPUSD XAGUSD EURUSD works on mt4 mt5 Demo and live account
Are you a skilled MQL4/MQL5 developer with a passion for creating cutting-edge Forex Trading EAs? We are looking for an experienced freelancer to join our team and help us build a powerful and efficient trading bot. Responsibilities: Develop, test, and optimize automated trading strategies in MQL4/MQL5. Collaborate with our team to refine requirements and implement advanced trading logic. Ensure the EA/bot operates
I need a AI signal generating and executing bot for forex trading. The bot should operate such that when i put it in a chart it will analyze the market, after several minutes it will display whether the trade is buying or selling and then execute a trade. It should display the one minute, five minute,15minute, 30 minute, one hour, 4 hours and daily time frame whether they are buying or selling. If it is buying the
Hello. I need a programmer to develop a modular Expert Advisor in MQL5 on RSI indicator such as buy or sell - Stop loss / TP on RSI range on 1H 15M 30M chart
I have an EA or would create a new one if necessary, but the overall goal is to extract data=,cum delta, delta bar, volume data from Orderflow Kinetick provider I use via Ninjatrader. I want that data to be used to decide what trades to take and when to close or reverse
HFT 100 - 200 USD
Searching for the HFT ( the most profitable ) which can make 50 to 100 % a day 0 losses for both mt4, mt5 Demo and live account i will test it first if it is good i will buy

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD
Son teslim tarihi
to 1 gün