Download MetaTrader 5

Can I use a Keyboard input to test?

To add comments, please log in or register
LINE123
1466
LINE123  
Hi: I need to test some math equations before moving on to the bigger picture. Can I use a keyboard input and a text output for testing? 
honest_knave
Moderator
2342
honest_knave  

Yes, you can use OBJ_EDIT or even just keydown chart events but if you are only looking at checking some equations doing all that can be more effort than it is worth.

Use a simple script to check your equations and just drag it onto your chart to test the result.

Change your numbers / equations, hit compile and drag onto a chart again.

#property strict

void OnStart()
  {
   Print(MyEquation(12.3,1.4));
  }

double MyEquation(double x, double y)
  {
   return(pow(x,y));  
  }


LINE123
1466
LINE123  
Thank you for the prompt and detailed reply!
To add comments, please log in or register