I need a simple EA program based on RVI study (calculations included). The original program was written in Thinkscript. I need that converted to MQL4

MQL4 Experten

Spezifikation

Hi,  I need an EA based on the following thinkscript program. The program is simple and self explanatory. Let me know if there are any questions.  I will need the actual script of the program so that I can  modify it.  

 Thank you. 

Input RVIlength =2;

Input Investment = 1000;

input No_Share_To-Buy =  Investment /close;


def highPrice = StDev(high, 2);

def lowPrice = StDev(low, 2);
def highAvgUp = ExpAverage(if high > high[1] then highPrice else 0, RVIlength);
def highAvgDown = ExpAverage(if high < high[1] then highPrice else 0, RVIlength);
def lowAvgUp = ExpAverage(if low > low[1] then lowPrice else 0, RVIlength);
def lowAvgDown = ExpAverage(if low < low[1] then lowPrice else 0, RVIlength);
def highRVI = 100 - 100 / (300 + highAvgUp / highAvgDown);
def lowRVI = 100 - 100 / (300 + lowAvgUp / lowAvgDown);
def RVI = (highRVI + lowRVI) / 2;

 

//the following  is a simple moving average//

def AVGRVI =  (MovingAverage(data = RVI, length =RVIlength));

def AvgRVI_V = if AVGRVI[-1]-AVGRVI>0 and AVGRVI-AVGRVI[1]<0 then 1 else 0;

def AvgRVI_H = if AVGRVI[-1]-AVGRVI<0 and AVGRVI-AVGRVI[1]>0 then 1 else 0;

def AVGRVI_Slope_Up = if AVGRVI-AVGRVI[1] >0 then 1 else 0;

def AVGRVI_Slope_down = if AVGRVI-AVGRVI[1] >0 then 1 else 0; 

/////////////////////////////////////////////////////////////////////////////////////////////////////// 

//And here are the Buy to Open (BTO), Sell to Close (STC) and STO and BTC sell signals:

def BTO = if AvgRvi_Valley==1 and AVGRVI_Slope_Up==1  then 1 else 0;

def STC = if  AvgRvi_hill==1   then 1 else 0;

def STO = if AvgRvi_hill[1]==1  and AVGRVI_Slope_Down==1  then 1 else 0;

def BTC = if AvgRvi_Valley[-1]==1 then 1 else 0;

//Please note that every STO is exactly one tick after the STC and every BTO is exactly one tick following the BTC (ie, the entire pairs chart is divided into buy or sell with no gaps in between unless the sale is going in the wrong direction within 3 ticks of the purchase. In other words, if the BTO doesn't generate a profit of any amount within the first three ticks, I'd take the loss in that trade and close the position. Same thing for STO positions. That too needs to lead to a positive P&L within the first three ticks (I don't care if after the third tick it doesn't generate a positive P&L-as a matter of fact, I would like the program to disregard the P&L past the first three ticks and not to close the position). The way I programmed that in Thinkscript is to assign a Timer to keep track of the P&L within only the first three ticks of any new BTO or STO signals.  IN MQL there may be easier ways to accomplish this than in thinkscript, but the following is my explanation of my workaround this issue which may help. 

 //The following will keep track of how many ticks has passed since the position was first opened regardless of how many more open signals are generated between that time and the time this trade position is closed  

Def BTO/STO_Timer = if (BTO ==1 or STO==1) then BTO/STO_Timer[1]+1 else if (STC ==1 or BTC==1) then 0 else BTO/STO_Timer[1]+1

//the following will remember the opening price of each position regardless of how many more Open signals are generated between that time and the time this trade position is closed  

Def BTO/STO_Price = if (BTO == 1 or STO ==1)  then Close else if (STC == 1 or BTC==1) then 0 else BTO/STO_Price[1];

//the following will generate the close signals if the P&L within the first three ticks of the new position is not going in the right direction.   

def StopLoss_STC = if BTO_Price > close and BTO[3]==1 and BTO/STO_Timer[3]<3 then 1 else  0;

def StopLoss_BTC = if STO_Price < close and STO[3] ==1 and BTO_Timer[3]<2 then 1 else 0;

  /////////////////////////////////////////////////////////////////////////////////////////////////////

//Lastly I need to Generate the BTO  and STO...  signals to auto_purchase the number of units as calculated in  "No_Share_To-Buy" with the signal above,

//I  need to generate STC  signal which closes the position  with either STC or StopLoss_STC

// and  to generate BTC  signal which closes the position with either BTC or StopLoss_BTC

 

BTW, I don't care if the program is in MQL4 or MQL5. Whichever is more convenient. 

Thank You,


David 

Bewerbungen

1
Entwickler 1
Bewertung
(195)
Projekte
395
28%
Schlichtung
155
20% / 52%
Frist nicht eingehalten
112
28%
Frei
2
Entwickler 2
Bewertung
(46)
Projekte
73
16%
Schlichtung
13
8% / 92%
Frist nicht eingehalten
37
51%
Frei
Ähnliche Aufträge
I need a feature setup that will input the Sunday opening price as a horizontal ray on any chart and can be used by another EA as part of a trading strategy. Like this TradingView example below
I need a mobile phone EA that is similar to no limitz EA mobile bot which will use an ea converter for scalping strategy that will execute trade automatically, set tp and sl for different pairs using integrated trading strategies . It must hedge for both action to buy and sell under 1 min and 5 min based on scalping strategy to execute trades
Hello everyone, I am looking for a talented developer who can help me create my EA. I have several indicators that I want to combine in the EA. I will take care of the integration of the indicators and the trading strategy myself, I need someone to program all the trading operations for me. This is probably absolutely standard, someone with experience has certainly programmed this several times before. Here are the
Hi there, I am looking for someone to build a Martingale/Cost Averaging Expert Advisor (EA) with the following features and functions: Martingale and Cost Averaging Features: 1. **Martingale Calculation Settings:** - Standard Martingale system allowing the trader to set the initial trade size and the pip step for subsequent trades. - Option for averaging up and averaging down: - **Averaging Up:** Lot size
Job Title: MQL5 Trading Bot Code Debugging and Optimization** **Description:** We are seeking an experienced MQL5 developer proficient in debugging and optimizing trading bot codes. The current project involves fixing existing code that runs into debugging issues without errors and optimizing it for efficient performance in live trading environments. **Responsibilities:** - Debug existing MQL5 trading bot code to
need a very skilled developer to create ea from indicator .i have source code for the indicator and it is non repainting. More details will be provided .i need parameters like take profit/stop/loss/loss recovery and few more
Active expert 250+ USD
hi, I must do changes to a dashboard with manual input of trader and active expert. Budget 250$ Can do? the budget is correct based on job to do. If you want me to increase the budget you can message me
HELLO DEAR DEV'S. I'VE AN EA BUT IT STOP WORKING WHEN MT4 HAS BEEN UPDATED TO THE LATEST VERSION (1420). SO I NEED A GOOD DEVELOPPER THAT COULD UPDATE THIS EA TO THE LATEST VERSION OF MT4 SO I CAN USE IT. NB: IT'S A SINGLE FILE (.EX4) AND THE PRICE CAN BE NEGOCIATED TO BE SUITABLE FOR BOTH PARTIES. THANK YOU
hey friends, I am looking to build a smart trading robot, for the capital market. He knew how to trade in all the different types of trade. Example - in shares, currencies, index, indices, ETFs, funds, commodities, options, futures and so on. Suitable for trading on all stock exchanges in the world. It will be possible to install the trading robot in the MetaTrader 5 trading software. But it will also be possible to
STI EA 30 USD
I need to convert this MT4 indicator into MT5 EA/indicator. The problem is I only have the .ex4 file bt not .mq4 file and it is also a repainting indicator. I need preliminary assessment if the conversion can be done based on .ex4 file first before exploring the EA details further. Attached is the indicator Budget below is just indicative for the assessment. We can discuss further once the conversion can be done and

Projektdetails

Budget
20 - 100 USD
Für die Entwickler
18 - 90 USD
Ausführungsfristen
von 1 bis 3 Tag(e)