วันอาทิตย์ที่ 30 ตุลาคม พ.ศ. 2559

MT4 Source Code Note #3 PointCalculate

เป้าหมาย
        - การคำนวณ Volume ที่จะใช้ในการเทรดเพื่อกำหนดความเสี่ยงในการเข้า Order
        - สร้างการคำนวณพื้น ฐานที่เหมาะสม
Source Code & Algorithm
เลือกราคาตัวอย่างมา 1 จุด
        double priceClose = Close[10];

หาว่าราคานี้มีทั้งหมดกี่ Point
       for(int i=0;i<Digits;i++)
      {
            priceClose=priceClose*10;
       }

นำ Point ที่ได้ทั้งหมด * Volume ต่ำสุด
      Print("1 Point use money : "+PointCalculate()*0.01);

คำนวณ Volume ที่สามารถใช้ได้ ต่อเงินทั้งหมด
     VolumeCanUse = AccountBalance()/(PointCalculate()*0.01);

MT4 File : Note#3

ไม่มีความคิดเห็น:

แสดงความคิดเห็น

วิธีขายจากกลุ่มสิงค์โปร

  BUY USDJPY 115.14   SL: 114.84 TP1: 115.34 TP2: 115.54 TP3: 115.74 SL 50 จุด tp 1 :20 tp 2 :40 tp 3 :60 ถ้าซื้อ 3 order ไป TP 1,2,3 profit...