resum seen:
If you search here (top right) for CTrade you'll find lots of examples how to use it - one is aready on your PC: ..\Experts\Examples\MACD\
Hello,
I wrote this code in Mql5:
CTrade Trade;
void OnTick()
{
double Bid=SymbolInfoDouble("USDCHF",SYMBOL_BID);
if(PositionsTotal()==0)
{
Trade.Sell(lot,"USDCHF",Bid,Bid+sl*Point(),Bid-tp*Point(),"Divergence");
Comment("Open= ");
}
}
In backtest, it writes Open= but it doesn't trade, even a single trade. What should I do to make it trade?

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
Hello,
I wrote this code in Mql5:
CTrade Trade;
void OnTick()
{
double Bid=SymbolInfoDouble("USDCHF",SYMBOL_BID);
if(PositionsTotal()==0)
{
Trade.Sell(lot,"USDCHF",Bid,Bid+sl*Point(),Bid-tp*Point(),"Divergence");
Comment("Open= ");
}
}
In backtest, it writes Open= but it doesn't trade, even a single trade. What should I do to make it trade?