Error on trading stock JFD broker

 

Hello

I receive this error when I using backtest mt5  on stocks  :   Error opening BUY position by ABC. : '(null)'

I tried some broker , same error again,

Is it any solution ?!

Thanks

 
Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.
 

Its not important whats the code , Can you find this error code in any EA ?! can you ?


Its  MACD simple EA (original on metatrader5)

attached picture of error

Files:
7.PNG  124 kb
 
William Roeder:
Do you really expect an answer? We can't see your broken code. There are no mind readers here and our crystal balls are cracked.

any comment ?!

I see usually sir you are waiting for this moment for attack others , I no see solution , only fighting .

In this case there is no important whats the code , this error is returned by sell/buy execution from server , not related to code

 
Javad Nejati:

In this case there is no important whats the code , this error is returned by sell/buy execution from server , not related to code

So you are manually opening orders and not using an EA?

 
Keith Watford:

So you are manually opening orders and not using an EA?

Its working manual

I want to use EA for backtest , but I get this special error that its not known on error codes

Its work good on CFD but not working for stock (for example Stock.Us)
 
Javad Nejati:

Its working manual

I want to use EA for backtest , but I get this special error that its not known on error codes

Its work good on CFD but not working for stock (for example Stock.Us)

So you are using an EA and yet, for some reason you think that the code is unimportant?!

 

This error '(null)' could mean that the order type check or filling check failed. I think you need to run it in Debug mode to find out more.

Set a breakpoint in CTrade::PositionOpen in Trade.mqh, you find it in Includes\Trade.

 
Keith Watford:

So you are using an EA and yet, for some reason you think that the code is unimportant?!

My dear , I told  Its MACD simple (original on metatrader5  that I attached now on post )

This is an error returning of execution function not related to EA

Files:
MACD_Sample.mq5  19 kb
 
lippmaje:

This error '(null)' could mean that the order type check or filling check failed. I think you need to run it in Debug mode to find out more.

Set a breakpoint in CTrade::PositionOpen in Trade.mqh, you find it in Includes\Trade.

Can you please explain a little more ? we have no error of compiling of code , we have no error on live , we have only error on backtest

============================================

Its obvious the code has no  problem because its MACD simple!

I cant find nowhere this error returning form server after execution  order

 
Javad Nejati:

My dear , I told  Its MACD simple (original on metatrader5  that I attached now on post )

This is an error returning of execution function not related to EA

There is no MACD simple with MT5.

From the code that you attached (line 359)

               if(m_trade.PositionOpen(Symbol(),ORDER_TYPE_SELL,InpLots,price,0.0,tp))
                  printf("Position by %s to be opened",Symbol());
               else
                 {
                  printf("Error opening SELL position by %s : '%s'",Symbol(),m_trade.ResultComment());
                  printf("Open parameters : price=%f,TP=%f",price,tp);
                 }
Reason: