Locating Errors in Formulas
--------------------------------------------------------------------------------
MetaStock does an excellent job of reporting errors in formulas. In fact, it is impossible to enter an invalid formula. This doesn't mean your formulas will always work as you expect them to, because MetaStock does not know what you are trying to create. However, it does mean that the syntax of the formula (e.g., function names, parameters, operators, parentheses, etc.) will always be valid.
When you enter a formula, MetaStock tests the formula's syntax. If an error is found, the formula will be redisplayed, the cursor will be positioned at the error location, and a message explaining the error will be displayed.
The effect of this error-reporting technique is that MetaStock helps you enter valid formulas.
This is illustrated in the following example.
Suppose you want to plot a formula containing a 10-period exponential moving average of the closing price and all you can remember is that the moving average function is "mov".
Enter what you do know in the Formula box of the Indicator Editor dialog:
mov
Click OK.
The cursor will be positioned after the "mov" function name and the message "A '(' must immediately follow a function name" will be displayed.
Now add an opening parenthesis, so that it looks like this:
mov(
Click OK.
This time, the cursor will be positioned after the "(" and the message "Price array (e.g., HIGH, LOW, CLOSE, etc.) or function expected" will be displayed.
Enter the price array identifier "CLOSE." Your formula should not look like:
mov(CLOSE
Click OK.
If you continue this process (i.e., enter partial formulas and then respond to the error message), MetaStock will prompt you through the formula entry process until the formula's syntax is correct (shown below).
mov(CLOSE,10,EXPONENTIAL)
This is a valuable technique! Any time you are not sure of the syntax of a formula or function, click OK.
ค้นหาข้อผิดพลาดในสูตร
-------------------------------------------------------------------------------- MetaStock ไม่ได้งานที่ดีของการรายงานข้อผิดพลาดในสูตร ในความเป็นจริง มันเป็นไปไม่ได้ที่จะป้อนสูตรที่ไม่ถูกต้องได้ นี้ไม่ได้หมายความว่าสูตรของคุณจะทำงานตามที่คาดไว้ เพราะเพลงไม่ได้รู้สิ่งที่คุณกำลังพยายามที่จะสร้าง อย่างไรก็ตามมันหมายความว่า ไวยากรณ์ของสูตร ( เช่น ฟังก์ชันชื่อพารามิเตอร์ , ผู้ประกอบการ , วงเล็บ , ฯลฯ ) มักจะเป็นใช้ได้
เมื่อคุณป้อนสูตร ทดสอบสูตรไวยากรณ์เพลง . หากพบข้อผิดพลาด สูตรจะ redisplayed , เคอร์เซอร์จะถูกวางในตำแหน่งที่ข้อผิดพลาดและข้อความอธิบายข้อผิดพลาดจะปรากฏ .
ผลของการรายงานข้อผิดพลาดนี้เป็นเทคนิคที่หุ้นช่วยให้คุณใส่สูตรที่ถูกต้อง
นี้จะแสดงในตัวอย่างต่อไปนี้ สมมติว่า คุณต้องการแปลง
สูตรที่มี 10 งวดเลขยกกำลังค่าเฉลี่ยเคลื่อนที่ของราคาปิด และทั้งหมดที่คุณสามารถจำได้ว่าค่าเฉลี่ยเคลื่อนที่ฟังก์ชัน " MOV " .
ใส่สิ่งที่คุณรู้ในสูตรกล่องของตัวบ่งชี้การแก้ไขกล่องโต้ตอบ :
MOV
คลิก OK
เคอร์เซอร์จะถูกวางไว้หลัง " MOV " ชื่อฟังก์ชันและข้อความ " ( ' ' ต้องทำตามหน้าที่ชื่อ " จะปรากฏ
ตอนนี้เพิ่มวงเล็บเปิด เพื่อให้มันมีลักษณะเช่นนี้ :
MOV (
คลิก OK
คราวนี้ เคอร์เซอร์จะถูกวางไว้หลัง " ( " และข้อความ " เรย์ราคา ( เช่น สูง , ต่ำ , ปิด , ฯลฯ ) หรือฟังก์ชันที่คาดว่า " จะปรากฏ
ระบุราคาเรย์ ระบุ " ปิด " สูตรของคุณควรมีลักษณะเช่น :
MOV ( ปิด
คลิก OK
ถ้าคุณทำขั้นตอนนี้ ( เช่น ใส่สูตรได้บางส่วนแล้ว ตอบกลับข้อความแสดงข้อผิดพลาด ) , เพลงจะพร้อมท์ให้คุณผ่านกระบวนการจนเป็นสูตรสูตรรายการไวยากรณ์คือ ที่ถูกต้อง ( แสดงด้านล่าง )
MOV ( ปิด 10 เลขชี้กำลัง )
นี่เป็นเทคนิคที่มีคุณค่า !เวลาใดก็ได้ที่คุณไม่แน่ใจเกี่ยวกับไวยากรณ์ของสูตรหรือฟังก์ชัน คลิก OK .
การแปล กรุณารอสักครู่..
