There are no comments up to now.
| Basic if statements in ForeXecutor |
|
|
| Written by Kimball Hall | |
| Friday, 21 November 2008 | |
|
The basis is 95% of your scripting will be the conditional IF statement. If the condition you describe is true then you can execute a command statement. A very basic IF statement must be opened with an “IF” and closed with an “ENDIF”. Look at the following example. IF (Condition) THEN Command ENDIF This will be the basic structure of all your “if” statements. Here is how a simple if statement is designed to create a buy signal if the 5 EMA is greater than the 10 EMA. IF EMA[0](Close, 5) > EMA[0](Close, 10) THEN AddBuyEntry ELSE AddSellEntry ENDIF When you create this kind of IF statement, the system starts at the top of the script and evaluates each line in succession. If one statement is not true, the system does not initiate the command and goes to the next condition to test it.
» No Comments
There are no comments up to now.
» Post Comment
|
| < Prev | Next > |
|---|