Hi,
I'm now in programming and I have this error with this function
void CheckEquityLoss()
{
if ((AccountEquity() < AccountEquity()(1 - EquityLoss/100)))
{
if(filterMartingala) Chiusura();
CloseAllBuy();
CloseAllSell();
}
}
in this function I want to close all trade if my floating loss is under a certain % of my equity (% based on my variable equityloss)
But when compile I had this error Some operator expected, how can I correct this?
thanks for help
Please edit your post (don't create a new post) and replace your code properly (with "</>" or Alt-S), or attach the original file directly with the "+ Attach file" button below the text box.
NB! Very important! DO NOT create a new post. EDIT your original post.
if ((AccountEquity() < AccountEquity()(1 - EquityLoss/100)))
- Edit your post, as requested.
- You have X()(Y) not X() * (Y).
- Obviously, X < 0.95 X will never be true. You need to remember what the equity was before opening. Only then can you test Xcurr < 0.95 Xprev.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi,
I'm now in programming and I have this error with this function
void CheckEquityLoss()
{
if ((AccountEquity() < AccountEquity()(1 - EquityLoss/100)))
{
if(filterMartingala) Chiusura();
CloseAllBuy();
CloseAllSell();
}
}
in this function I want to close all trade if my floating loss is under a certain % of my equity (% based on my variable equityloss)
But when compile I had this error Some operator expected, how can I correct this?
thanks for help