error 130.... please help

 

backtesting occur error 130

what's wrong with my code ?

 
forexparvenu:

Print the error and the relevant variables . . . What are Function return values ? How do I use them ?

Do your trades comply with this ? Requirements and Limitations in Making Trades what are the values for your STOPLEVEL and FREEZELEVEL ?

 
if (Order == OPENBUY) 
{
if (UseBuySL) StopLossLevel = Ask - BuySL * Point; else StopLossLevel = 0.0;
if (UseBuyTP) TakeProfitLevel = Ask + BuyTP * Point; else TakeProfitLevel = 0.0;

Add Print to check what Ask-BuySL*Point actually equates to

 
GumRai:

Add Print to check what Ask-BuySL*Point actually equates to


i added bracket, but still same error.
 
RaptorUK:

Print the error and the relevant variables . . . What are Function return values ? How do I use them ?

Do your trades comply with this ? Requirements and Limitations in Making Trades what are the values for your STOPLEVEL and FREEZELEVEL ?


^^^^^^^^^^^^^^^
 
RaptorUK:

^^^^^^^^^^^^^^^

im checking each part by part now.


so strange because i cant found any mistake .

 
RaptorUK:

^^^^^^^^^^^^^^^

did you found any error on my code ?


please tell me, thanks..

 
forexparvenu:

did you found any error on my code ?

please tell me, thanks..

I can't see your code . . .
 
RaptorUK:
I can't see your code . . .


that's my full code.
 
forexparvenu:

that's my full code.

You have many basic things to fix . . .

You are not checking trading function return values, please fix this: What are Function return values ? How do I use them ?

You must count down in loops, NOT up, where you are closing or deleting Orders, please fix this: Loops and Closing or Deleting Orders

Check you are not trying to place order too close to current price, verify your trades meet these requirements: Requirements and Limitations in Making Trades

If your STOPLEVEL is > 0 you cannot place pending orders at Bid/Ask, what is your STOPLEVEL ?

For a Buy the SL is below the Open price and the TP is above the Open price, the same applies for a BUYSTOP and BUYLIMIT

 
RaptorUK:

You have many basic things to fix . . .

You are not checking trading function return values, please fix this: What are Function return values ? How do I use them ?

You must count down in loops, NOT up, where you are closing or deleting Orders, please fix this: Loops and Closing or Deleting Orders

Check you are not trying to place order too close to current price, verify your trades meet these requirements: Requirements and Limitations in Making Trades

If your STOPLEVEL is > 0 you cannot place pending orders at Bid/Ask, what is your STOPLEVEL ?

For a Buy the SL is below the Open price and the TP is above the Open price, the same applies for a BUYSTOP and BUYLIMIT


thanks for your answer, that's helpful.
Reason: