what is the code for identify is trade rn or not? - page 2

 
The Strategy Tester has some limitations, but it gives you lots of data in a short period of time . . . why would you test your code anywhere else, at least initially ?
 
yadgayan:

ok. does Strategy Tester is 100% sure? I did some tests, but some time it not trade. but it can's be. because my function should work. if i run in real it work. so how i solve this issue?

If should work and doesn't because your code is wrong. Put some Print statements above the IF then use the tester to get where you think it should open. Look at the dumped variables and your IF. That's called debugging YOUR code.
Reason: