[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 973
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
extern int Period_MA = 21;
bool Fact_Up = true;
bool Fact_Dn = true;
int start()
{
double MA;
MA=iMA(NULL,0,Period_MA,0,MODE_SMA,PRICE_CLOSE,0);
if (Bid > MA && Fact_Up == true)
{
Fact_Dn = true;
Fact_Up = false;
Alert("Price is above MA(",Period_MA,").");
}
if (Bid < MA && Fact_Dn == true )
{
Fact_Up = true;
Fact_Dn = false;
Alert("Price is below MA(",Period_MA,").");
}
return;
}
Anyway, it's from the textbook, I wanted to practice, but I got a deadlock, after crossing
I want to give it a report once. How do I get it to report on every tick?
help?
The question is not quite rightly posed
The question is not quite right
it only triggers a message once only after the crossing,
How can I get a message after every tick,
so that on every tick there is a message like "price is above the mach" or "price is below the mach"?
Hello, I wanted to make a filter so that a given number of buy/sell signals issued by the indicator would be skipped. I tried to implement it with global variables to fix the number of signals received and compare it with a given variable. It works, but in global variables the number of signals is not increasing. What is the error? Or there is a simpler way to implement the idea?
Can you please tell me....
How do I normalise the lot to one decimal place? eg lot 1.43 or 1.438 to 1.4 or 1.5 ? otherwise it gives error 131 - incorrect lot size?
How do I normalise my lot to one decimal place? e.g. lot 1.43 or 1.438 to 1.4 or 1.5 ? otherwise it gives error 131 - wrong lot size?
Here's a whole lot normalization feature, like in my EA... In the editor, press F1 on NormalizeDouble() - in the Help
...and it's all explained in details...
Thanks. but double lotStep = MarketInfo(Symbol(), MODE_LOTSTEP);
can't we just do double lotStep = 0.1;?
Thank you. And double lotStep = MarketInfo(Symbol(), MODE_LOTSTEP);
can't we just do double lotStep = 0.1;?
Lotstep is usually 0.01 - it depends on both the broker and the account type, read the trading conditions for your account type -
if there is a 0.1 lotstep, then you can... This is an option for any type of account, so you don't have to worry about it...
Man, does anyone know the answer to my question?