Please help with getting breakeven function right

 
 

I tried adding the Breakeven function from the Global Scope right below the code, in the onTick and still it does not work. Please help me get it right.... Even if you use another method of finding breakeven I would highly appreciate it.


            
 
Bra Itu: and still it does not work. Please help me get it right....
  1. “Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
         How To Ask Questions The Smart Way. (2004)
              When asking about code
              Be precise and informative about your problem

  2. Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
              Code debugging - Developing programs - MetaEditor Help
              Error Handling and Logging in MQL5 - MQL5 Articles (2015)
              Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
              Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010)

 
William Roeder #:
  1. “Doesn't work” is meaningless — just like saying the car doesn't work. Doesn't start, won't go in gear, no electrical, missing the key, flat tires — meaningless.
         How To Ask Questions The Smart Way. (2004)
              When asking about code
              Be precise and informative about your problem

  2. Use the debugger or print out your variables, including _LastError and prices and find out why. Do you really expect us to debug your code for you?
              Code debugging - Developing programs - MetaEditor Help
              Error Handling and Logging in MQL5 - MQL5 Articles (2015)
              Tracing, Debugging and Structural Analysis of Source Code - MQL5 Articles (2011)
              Introduction to MQL5: How to write simple Expert Advisor and Custom Indicator - MQL5 Articles (2010)

No it compiles well thing is when I call the Breakeven function in the OnTick it does indeed compile. But when I back test it, it does not Breakeven in the main chart. Please help me get it right.
 
Bra Itu #: No it compiles well thing is when I call the Breakeven function in the OnTick it does indeed compile.

Where did you see the word “compile” in my previous post?