
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Puzastyle:
ello all,
First of all both EA and Indi is not mine got it from internet.
Need EA expert to modify the EA to open the order based on in RSI arrow,
eg : if 1st arrow "up" open buy if TP not hit then open another buy at 2nd arrow and still not hit open buy at 3rd arrow and continue.. until max order reach or TP hit.. 1st order size, 2nd order size ,3rd order size.... based on EA setting
for sell just reversed the order...
now EA open based on iclose ( if I not mistaken) and open 2nd order base on step ( eg :20)
just look at the RSI indicator arrow .. put your MT4 to the smallest screen so that you can see the big picture, time frame is good for all but i prefer tf30minute,
the concept is just like martingle + RSI divergence.
hope somebody can help.
p/s ; sorry for bad english
Hi Puzastyle, did you get a solution for this question. I am also interested in the EA you describe. Do you get the EA adjusted based on your question. Please can you also give me the EA? Thank you!
please suggest me lot increase 0.01,0.02,0.03,.0.04,0.05,0.06,0.07.0.08 max 10 order (as martingale please see and modified ea )
//+------------------------------------------------------------------+
//| RSI.mq4 |
//| Copyright 2021, MetaQuotes Software Corp. |
//| https://www.mql5.com |
//+------------------------------------------------------------------+
#property copyright "Copyright 2021, MetaQuotes Software Corp."
#property link "https://www.mql5.com"
#property version "1.00"
#property strict
input int MagicNumber = 111;
datetime dt;
;
input double Starting_lot = 0.01;
extern bool UseMartingale=true;
extern int MartingalelotMultiplier = 2;
double Lots = 0.01;
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//---
dt = Time[0];
//---
return(INIT_SUCCEEDED);
}
//+------------------------------------------------------------------+
//| Expert deinitialization function |
//+------------------------------------------------------------------+
void OnDeinit(const int reason)
{
//---
}
//+------------------------------------------------------------------+
//| Expert tick function |
//+------------------------------------------------------------------+
void OnTick()
{
//---
if (isnewbar())
{
double prevrsi0 = iRSI(_Symbol,PERIOD_CURRENT,10,PRICE_OPEN,0);
double prevrsi1 = iRSI(_Symbol,PERIOD_CURRENT,10,PRICE_OPEN,1);
if(prevrsi0 <70 && prevrsi1 >70 )
{
for( int cmt= 10; cmt >=1 ; cmt++)
{
double lotsize=NormalizeDouble((Starting_lot*cmt),2);
if(OrdersTotal()>0) { closeposition(OP_BUY);}
OrderSend(Symbol(),OP_SELL,lotsize,Bid,14,0,0,NULL,MagicNumber);
}
}
else if (prevrsi0 > 30 && prevrsi1 < 30 )
{
for( int cmt= 1; cmt <=10; cmt++)
{
double lotsize=NormalizeDouble((Starting_lot*cmt),2);
if(OrdersTotal()>0) { closeposition(OP_SELL);}
OrderSend(_Symbol,OP_BUY,lotsize,Ask,14,0,0,NULL,MagicNumber);
}
}
}
return;
}
//--------------------------------------------------------------------------------------------------------------
void closeposition(int type){
for(int i = OrdersTotal(); i>=0; i--){
OrderSelect(i, SELECT_BY_POS);
if(OrderMagicNumber()== MagicNumber && OrderType()==type){
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(), MODE_BID+OrderType()),10);
}
}
}
//------------------------------------------------------------------------------------------------------------
bool isnewbar(){
if(Time[0]!=dt){
dt = Time[0];
return true;
}
return false;
}
//++++++++++++++++++++++++++++++++++//++++++++++++++++++++++++//+++++++++++++++++++++++++++++++++++++
If you want a proper answer then please fix your post.
Edit it (don't create a new post) and place your code properly (with "</>" or Alt-S), or attach the original file directly with the "+ Attach file" button below the text box.
OrderClose(OrderTicket(),OrderLots(),MarketInfo(OrderSymbol(), MODE_BID+OrderType()),10);
Please edit your (original) post and use the CODE button (or Alt+S)!
Don't Hijack other threads for your off-topic post. Next time, make your own, new, thread.
No need for such convoluted code (converting MODE_BID to MODE_ASK depending on OrderType and then retrieving the value). Just use OrderClosePrice().
You haven't stated a problem, you stated a want. Show us your attempt (using the CODE button) and state the nature of your difficulty.
No free help (2017)
Or pay someone. Top of every page is the link Freelance.
Hiring to write script - General - MQL5 programming forum (2018)
We're not going to code it for you (although it could happen if you are lucky or the issue is interesting).
No free help (2017)