Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 286
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
At the zero bar the indicator data will not be fixed. It will practically change on every tick, as the zero bar has not yet been formed. Therefore, take data starting from the first bar. If you want to take it from the zero bar, then change PRICE_CLOSE to PRICE_OPEN - this is the only price that does not change on the zero bar, but the indicator will slightly differ from its standard representation - just a little.
It should be understood that this approach cuts off all the current dynamics - all price movements occurring on the current bar will only be "noticed" at the arrival of a new bar.
It should be understood that this approach cuts off all the current dynamics - all price movements occurring on the current bar will be "noticed" only with the arrival of a new bar.
And false positives - "chattering".
There is always a choice.
And false positives - "chatter".
There's always a choice.
Rattling, of course, presents a definite problem. But such a solution is akin to treating a headache by truncating the head.
The article "ShowCandleSize" published on 11.11.2013 07:54 is not displaying correctly and cannot be edited for some unknown reason.
Contacted support on November 15 with this issue at noreply@metaquotes.net, but did not receive a reply.
Can you please tell me the correct address for such a question.
Respectfully.
--
Vladislav Shurkin,
On November 20, 2013.
Give me a link to the publication to understand what it is about.
Can you please tell me why in the Strategy Tester the EA works, but in the demo account, even if I set a small timeframe, the EA just smiles and does not open a position?
beta version.0
extern double Minimal_lot = 1;//values:1;0.10;0.01
extern double Price_item = 10;
extern double Percent_profit = 20;
extern double Percent_risk = 20;
extern datetime time1 = D'24.11.2014 19:00';
extern double price1 = 1.3450;
extern datetime time2 = D'24.11.2014 19:00';
extern double price2 = 1.3560;
extern datetime time_close = D'24.11.2014 19:00:00';//format of time dd.mm.ggg hh:mm:ss
extern int AF = 100;
int init()
{
//----
//----
return(0);
}
//+------------------------------------------------------------------+
//| expert start function |
//+------------------------------------------------------------------+
int start()
{
double TP,SL,BBU,BBD,dLTU,dLTD,N;
string comment = NULL;
string LTU,LTD;
int ticket;
int DSL = ((Percent_Risk/100)*AccountBalance());
int DTP = ((Percent_Profit/100)*AccountBalance());
int Times = (Time_close/3600)-(TimeLocal())/3600;
BBU = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_UPPER,0);
BBD = iBands(NULL,0,20,2,0,PRICE_CLOSE,MODE_LOWER,0);
N = ((AccountBalance()*(Percent_Risk/100))/(Point_price*AF))*Minimum_lot;
TP = (DSL+((Percent_Risk/100)*Times)/(Point_price*AF*(Percent_profit/100)))/Point_price;
SL = (DTP-((Percent_risk/100)*Times)/(Price_item*AF*(Percent_profit/100)))/Price_item;
if(price1<price2)
{
LTU = ObjectCreate("Trend Up",OBJ_TREND,0,time1,price1,time2);
dLTU = StrToDouble(LTU);
}
if(price1>price2)
{
LTD = ObjectCreate("TrendBack",OBJ_TREND,0,time1,price1,time2,price2);
dLTU = StrToDouble(LTD);
}
//----
if(BBU<dLTU)
{
ticket=OrderSend(Symbol(),OP_SELL,N,Bid,3,Bid+SL*Point,Ask-TP*Point,comment,365,Green);
}
if(Closing time==true)
{
OrderClose(OrderTicket(),OrderLots(),Ask,10);
}
if(BBD>dLTD)
{
ticket=OrderSend(Symbol(),OP_BUY,N,Ask,3,Bid-SL*Point,Ask+TP*Point,comment,367,Green);
}
if(Closing time==true)
{
OrderClose(OrderTicket(),OrderLots(),Bid,10);
}
return(0);
Good afternoon all!
Please advise .
PROBLEM
- for real trading in the terminal there are 2 identical charts EUR-USD timeframe - 5 min.
I NEED THAT
- the number of candlesticks in these charts was different (for example - in the graph N1 - 500 bars, the graph N2- 600 bars)
I've deleted candlesticks through the window ARCHIVE QUOTES ..... but they are deleted simultaneously in both charts (I need only one)
Q1. Is it possible to have two identical charts with different number of candlesticks?
Q2 If it is possible to trade on two identical charts with different number of bars, how to format the code.
if (T == true ) // if condition for chart N1 has been fulfilled ( how can we specify that this condition concerns chart N1???)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-4710*Point,Bid+300*Point, "jfh",1); // open the order( how do we specify that this order should be opened in the N1 chart ???)
if ( S == true ) // if the condition for chart N2 has been met ( how should we specify that this condition refers to the N2chart ???)
OrderSend(Symbol(),OP_BUY,0.1,Ask,1,Bid-4710*Point,Bid+300*Point, "jfh",1); // open the order ( how do we specify that this order should be opened in the N2 chart???)
Thank you.
How can I add price selection to custom indicator? As an example - "Custom Moving Averages", the price in the code is set everywhere Close, although in the standard indicator "Moving Average" you can select a price from the list. This is the same for all indicators with open code from MT4 delivery.
How can I add price selection to custom indicator? As an example - "Custom Moving Averages", the price in the code is set everywhere Close, although in the standard indicator "Moving Average" you can select a price from the list. This is the same for all indicators with open code from MT4 delivery.
You need to add to the code in this situation. You create an external variable, for example Appled_Price.
And you change all PRICE_CLOSE into Appled_Price in the code.
The Appled_Price values can be within:
Good afternoon all!
Can you please tell me .
I NEED THAT
- the number of candlesticks on these charts was different (for example on the chart N1 - 500 bars, on the chart N2- 600 bars)
Thank you.
Can you explain why you need it? I do not understand the sense of this mystery. Does the profit depend on it?
You need to add to the code in this situation. Create an external variable, e.g. Appled_Price.
And you change all PRICE_CLOSE in the code to Appled_Price.
Ah, yes, sorry, I meant the new builds, and there's a little unusual code.
That's the thing, the code has no free-form price, everything is in arrays, you just can't change it, I've tried it (((
And if it worked, how to make a selection from a drop-down list (like in the picture from my question)?