[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 584
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
Judging by the comment on the screenshot - you are controlling the zero bar to make decisions.
This is not good... On a zero bar, indicators can go back and forth many times during bar formation, thus creating false signals (jitter).
To avoid this, check the first bar already formed.
i.e. for accurate PRICE_CLOSE calculation, it is reasonable to use the 1st and subsequent bars?
am I right?
but if you use PRICE_OPEN you can use 0 bar
check code 0 bar
bool NewBar()
{
static datetime lastbar = 0;
datetime curbar = Time[0];
if(lastbar!=curbar)
{
lastbar=curbar;
return (true);
}
else
{
return(false);
}
i.e. for an accurate PRICE_CLOSE calculation, it is reasonable to use the 1st and subsequent bars?
am I right?
and if you use PRICE_OPEN you can use 0 bar
the code of the 0 bar check
bool NewBar()
{
static datetime lastbar = 0;
datetime curbar = Time[0];
if(lastbar!=curbar)
{
lastbar=curbar;
return (true);
}
else
{
return(false);
}
This function returns a flag to open a new bar. How does it relate to the price that is used to calculate the indicators?
It doesn't...
This function returns a flag to open a new bar. How does it relate to the price used to calculate the indicators?
none...
Right.
but a question.
i.e., to accurately calculate the PRICE_CLOSE price, it is reasonable to use the 1st and subsequent bars?
am I right?
and if I use PRICE_OPEN then I can use 0 bars?
Right.
but a question
i.e. for an accurate PRICE_CLOSE calculation, it is appropriate to use 1 and subsequent bars?
am I right?
and if PRICE_OPEN is used then 0 bars can be used?
Yes
Thank you
The expected payoff is -2.11 (negative) when testing with 0.1 lot a deposit of 10,000. Is it true that if you reverse the condition you get a profitable system or is this not the case?
It is not.
The MO you have is equal to minus the spread with a tail (assuming that the spread is equal to two points). The system can be further manipulated, if its MO is at least two or three times the spread... That is, in your case and assuming that the spread is two pips, the MO must be greater than 5.
Wrong.
Your MO is minus the spread with a tail (assuming the spread is two points). The system can be further manipulated if its MO is at least twice or three times the spread... That is, in your case and assuming that the spread is two pips, the MO must be greater than 5.
Why use a cycle if only 1 bar is taken? Just use 1 instead of "bar". Only check for new bars so that you don't have to recalculate everything on every tick.
one more time.
the simplest version (schematic)
Thank you for the schematic.
It would be great if my orders were of one currency pair. But I have a multi-currency EA for 8 pairs + condition to buy or sell them, i.e. I have 16 tickets. My Expert Advisor is working at every new bar opening, closes all orders, checks the conditions and sells or buys currencies. It is not a problem during the day but it is not profitable to close and reopen orders in one direction during flat.
Do I need to work with arrays or is it easier to put such a ticking scheme on every pair?