Lwma close: if color[1] != color[2]

Job finished

Execution time 13 minutes
Feedback from customer
Thank you for the quick work.
Feedback from employee
Thank you for the project. It was a pleasure working with you.

Specification

Hello, I'm looking for a programmer who knows the lwma indicator thoroughly. (mql5)

1, I have an mql5 EA that I start manually from the panel. I want the EA to only monitor the color change of the lwma indicator when the position is started. Only the lwma indicator color created from the data of closed candles is interesting. The color created from the unclosed - currently running - data is not interesting. So, if the lwma colors created during the last two closed candles do not match, the position should be closed.
color[1] != color[2] -- positionclose

2, I would like the EA to only take 1 position on a chart.

3, The magic number should be set so that it only closes a position on the chart where it was started.

Unfortunately, I can't extract the color data from the lwma indicator in the event of a color change.


I am attaching the lwma indicator and the EA.

The (close)program in the OnTick unit is not working.

Thanks


Files:

MQ5
lwma.mq5
9.1 Kb

Responded

1
Developer 1
Rating
(16)
Projects
19
11%
Arbitration
4
25% / 50%
Overdue
1
5%
Working
2
Developer 2
Rating
(1264)
Projects
1684
49%
Arbitration
52
71% / 12%
Overdue
37
2%
Free
3
Developer 3
Rating
(5)
Projects
5
20%
Arbitration
0
Overdue
0
Working
4
Developer 4
Rating
(621)
Projects
972
47%
Arbitration
32
38% / 34%
Overdue
96
10%
Loaded
Published: 6 codes
5
Developer 5
Rating
(159)
Projects
284
35%
Arbitration
17
24% / 59%
Overdue
42
15%
Loaded
6
Developer 6
Rating
(98)
Projects
106
28%
Arbitration
3
33% / 33%
Overdue
2
2%
Working
7
Developer 7
Rating
(39)
Projects
57
18%
Arbitration
6
33% / 17%
Overdue
1
2%
Free
Published: 2 codes
8
Developer 8
Rating
(268)
Projects
396
27%
Arbitration
38
39% / 50%
Overdue
1
0%
Free
9
Developer 9
Rating
(433)
Projects
686
34%
Arbitration
32
72% / 9%
Overdue
22
3%
Free
10
Developer 10
Rating
(300)
Projects
306
69%
Arbitration
2
100% / 0%
Overdue
0
Free
Published: 1 code
11
Developer 11
Rating
(175)
Projects
225
20%
Arbitration
19
42% / 16%
Overdue
0
Loaded
12
Developer 12
Rating
(32)
Projects
47
74%
Arbitration
4
50% / 0%
Overdue
0
Free
13
Developer 13
Rating
(304)
Projects
544
35%
Arbitration
77
31% / 42%
Overdue
196
36%
Loaded
14
Developer 14
Rating
(574)
Projects
945
47%
Arbitration
309
58% / 27%
Overdue
125
13%
Free
15
Developer 15
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
16
Developer 16
Rating
(5)
Projects
5
0%
Arbitration
0
Overdue
1
20%
Working
17
Developer 17
Rating
(77)
Projects
240
73%
Arbitration
7
100% / 0%
Overdue
1
0%
Free
18
Developer 18
Rating
(539)
Projects
618
33%
Arbitration
35
37% / 49%
Overdue
10
2%
Busy
19
Developer 19
Rating
(4)
Projects
7
0%
Arbitration
1
100% / 0%
Overdue
3
43%
Working
20
Developer 20
Rating
(451)
Projects
563
26%
Arbitration
24
42% / 38%
Overdue
85
15%
Working
Published: 6 codes
21
Developer 21
Rating
(2622)
Projects
3327
67%
Arbitration
77
48% / 14%
Overdue
342
10%
Free
Published: 1 code
22
Developer 22
Rating
(442)
Projects
570
37%
Arbitration
106
39% / 33%
Overdue
17
3%
Free
23
Developer 23
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
24
Developer 24
Rating
Projects
0
0%
Arbitration
0
Overdue
0
Free
25
Developer 25
Rating
(5)
Projects
4
0%
Arbitration
2
50% / 50%
Overdue
2
50%
Free
26
Developer 26
Rating
(6)
Projects
10
30%
Arbitration
0
Overdue
2
20%
Working
Similar orders
Acquire existing profitable Expert Advisor with source code for client investment portfolio - Full .mq5 code (clean & commented) - 4+ years backtest (Jan 2022 - Dec 2025, 100% tick data) - ~10% monthly return - Max DD ≤15% - No grid/martingale (strictly enforced) - 1-month forward test required - Send trade history + EA details for review - Demo EA file needed for backtest replication - Open to any currency
i need the multi-chain dex bot with set up and installation i need you to help me set the copy reading wallet on binance or phantom with capital for 100 Euro to 1 Million in one year
123c ea 30+ USD
i need to fix this it is returning invald 2025.12.25 23:08:31.011 Trades '700031908': failed prices for 0 [Invalid request] i want it fixed i use Ai to chek and this is what it report
I have an issue with my ninja script and i would like you to help me straighten things I wanted to create an indicator and i have the source code already but i am getting compiling errors on my NinjaTrader And i tried fixing the error it still same I sent 3 images here for you to understand the errors and i would like to ask if you can help me fix it so i can go ahead and compile my source code. Thanks
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
I need an MQL5 indicator that identifies reversals without repainting or placing signals with an offset. The goal is to minimize lag and reduce whipsaw trades. Desired results are similar to the attached image. Requirements: - No repainting - No signal offset - Emphasis on reducing lag - MQL5 compatible - Clear, concise code If you have the expertise to create a reliable, high-performance indicator, let's discuss
I'm looking for a skilled trader/developer to share a proven scalping strategy on M1-M5 timeframes without using Martingale, Grid trading, or Hedge. Requirements: - Minimum trade duration: 2 minutes - Lot size: <20 - Proof of skill: Provide MT4/MT5 trade history report (PDF/HTML) - No High Frequency Trades - GMT+1 timezone, flexible hours - Price negotiable, performance-based compensation possible If you're a
Good day, I would like to build an automated trading system for Ninjatrader using 2 MACD, a Supertrend, and a moving average indicator. I want the option to adjust the indicator settings, the ability to trade at three different times, and the option to receive alerts. I want to get an idea of what that will cost me. It will enter trades on all blue take one contract out at a fixed point, move the stop to break even
I have an indicator i need automated i use it manually and it plots arrows. Can you automate it for my Ninjatrader8? Do you need to see file? Expert Ninjatrader Developer can Bid for this project
Hi! I need a trading bot/robot to automate my trades. I don't need much complicated bot. I want it to enter, exit trade and can do this in matter of second or multiple times in a second. Should be able to adjust, put SL/TP in the same menu. Would appreciate your ideas! Please write to me before anything else

Project information

Budget
30 - 60 USD