Need program to close open position is the conditions are not valid on next candle

İş tamamlandı

Tamamlanma süresi: 1 saat
Müşteri tarafından geri bildirim
Gave the solution that I asked for and also helped with a few questions
Geliştirici tarafından geri bildirim
5 star customer!

İş Gereklilikleri

Hi,


Very simple code, lines in yellow need to execute on the next candle if the buy or sell signal is no longer valid, SL is just as backup if the market reverses to quickly. I am no programmer so excuse if this is not written eloquently. I have posted only the relevant bit.


      if(PriceInfo[1].close > EMA5[0] && EMA10[0] > EMA20[0] && EMA20[0] > EMA40[0] && RSI14[0] > RSI40[0] && RSI14[0] > 50 && RSI40[0] > 50) {

         if(PositionsTotal()==0) {
            trade.Buy(0.10,_Symbol,Ask,Ask-200*_Point,0,"BUY");
              if(PositionsTotal()>0 || PriceInfo[1].close < EMA5[0] || RSI14[0] < RSI40[0] ){
              trade.Sell(0.10,_Symbol,Bid,0,0,"BUY Close");    
              
              }  
         }
         //else if because we will always do either buy or sell, not both
      } else if(PriceInfo[1].close < EMA5[0] && EMA10[0] < EMA20[0] && EMA20[0] < EMA40[0] && RSI14[0] < RSI40[0] && RSI14[0] < 50 && RSI40[0] < 50) {
         if(PositionsTotal()==0) {
            trade.Sell(0.10,_Symbol,Bid,Bid+200*_Point,0,"SELL");
              if(PositionsTotal()>0 || PriceInfo[1].close > EMA5[0] || RSI14[0] > RSI40[0] ) {
              trade.Buy(0.10,_Symbol,Ask,0,0,"Sell Close");
            }
          }
       }
      Print("_________________Tick End__________________________");
   }

Yanıtlandı

1
Geliştirici 1
Derecelendirme
(137)
Projeler
160
23%
Arabuluculuk
7
0% / 43%
Süresi dolmuş
4
3%
Yüklendi
2
Geliştirici 2
Derecelendirme
(19)
Projeler
26
27%
Arabuluculuk
3
0% / 100%
Süresi dolmuş
2
8%
Serbest
3
Geliştirici 3
Derecelendirme
(92)
Projeler
109
34%
Arabuluculuk
5
40% / 20%
Süresi dolmuş
5
5%
Çalışıyor
4
Geliştirici 4
Derecelendirme
(196)
Projeler
200
28%
Arabuluculuk
0
Süresi dolmuş
3
2%
Serbest
5
Geliştirici 5
Derecelendirme
(30)
Projeler
55
22%
Arabuluculuk
12
67% / 8%
Süresi dolmuş
2
4%
Serbest
Benzer siparişler
### Summary of EA Requirements 1. **Time Period**: - The EA should operate on the H4 timeframe. 2. **RelicusRoad MACD v2 Indicator**: - **Parameters**: - Fast EMA Period: 12 - Fast EMA Type: Close price - Slow EMA Period: 24 - Slow EMA Type: Close price - Signal SMA Period: 9 - The EA should use this indicator to determine the crossover condition between the MACD line and the signal line. 3
An EA that executes when the 21 and 55 SMA Cross on certain time frame also the EA will understand supply and demand levels and executes when price reacts on this levels specified and target/stoploss levels will be predetermined...also the robot will also comprise stochastic oscillator
Ind V5 TV Strategy Requirements: Instruments: Forex pairs, Crypto and Stocks across exchanges TimeFrame: Multi-Time Frame comparisons, details below Indicators: Ichimoku Cloud, ATR & Choppiness Index Trade times: First Order: Day of Week Start Time, Day of Week First Order time, Day of Week Last Order Time and Day of Week Square Off Time Intraday TF: 1 min, 3 mins, 9 mins, 27 mins and 81 mins Position Size (Lots)
I want this EA in mql4. The two indicators are written in pinescript Developer should please understand it to develop the EA. One of the indicator will be used as direction and the other for entry. The should have code that it can be used for( only one PC and an expiration date. ; this the developer should show me how to adjust it, so that I can adjust to my preference). Parameters:number of trades.lotsize, SL pips
I need a robot for forex trading~~The way the robot should work is that when I put it into a 5 minute chart, the chart will show 15 minutes, one hour, Regardless of whether they are buying or selling, they must buy or sell in the same color at the same time~~~ Use the following indicators: HalfTrend 1 & alerts mtf Trafficlight indicator.MQ4 When placed into a 5 minute chart ~ the chart will show 15 minutes, one
I am looking for a programmer to do EA trader. If you can understand what I want from the video i do and you can do it, contact me because you will be able to do what I want. https://drive.google.com/file/d/1wbHxbUQQqCkdpr0-pHfIh2b288LzYTV2/view?usp=sharing maximum budget = 150$ Preference is given to someone who: -speaks Arabic so I can explain it clearly to him - And the lowest price
I SIMPLY NEED SOMEONE TO INTEGRATE THESE OPTIMIZATION ALGOS INTO MY EA. THE LIBRARY IS ATTACHED BELOW. NEED THIS DONE FAST. LET ME KNOW IF YOU HAVE OTHER QUESTIONS A list of implemented optimization algorithms: BGA (binary genetic algorithm) ANS (across neighbourhood search) CLA (code lock algorithm) P_O_ES ((P+O) evolution strategies) CTA (Comet Tail Algorithm) SDSm (stochastic diffusion search M) ESG (evolution of
Create a robot like this live on YouTube, it is a simple hedge system that does not have martingale or other risky means of.making money.... please check out the link and if it is possible for you to repeat this then reach out with a sample and price. YouTube: https://www.youtube.com/live/cT_42RWzq_0?si=Z8M5mKkAMGZhxdTL
Hi There I am looking for someone to create me a simple anti martingale EA The EA will open a buy and sell the moment the EA is attached to a chart. Should the price increase - additional buys will open. This will continue until profit point Should the price retrace all trades should close just before breakeven point. New sequence starts immediatly thereafter The sell trade will close if the combined profit of buys
Job Description: We are seeking an experienced EA programmer to create an EA that utilizes SnR + Trendlines + Multi timeframe confluence Project Requirements: - Support and Resistance, Open Close levels/kissing candles/Rejection block, Support broken becomes Resistance(SbR), Resistance broken becomes Support(RbS), Quasimodo Levels, Asian Range, London Killzone, London Open, New York Killzone, New York Open

Proje bilgisi

Bütçe
30+ USD
Geliştirici için
27 USD