Open Forex4you Account

Server รัน EA 1000 / ปี

สั่งชื้อคู่มือการโปรแรกม MQL4

Author Topic: จะเขียน code นี้ให้สั้นลงทำยังไงครับถ้าจะเอาไปทำเป็น indicator จะต้องทำยังไงครับ  (Read 9645 times)

tewari123

  • Newbie
  • *
  • Posts: 3
v=(
       iVolume(NULL,0,1) + iVolume(NULL,0,2) + iVolume(NULL,0,3) + iVolume(NULL,0,4) + iVolume(NULL,0,5)
    + iVolume(NULL,0,6) + iVolume(NULL,0,7) + iVolume(NULL,0,8) + iVolume(NULL,0,9) + iVolume(NULL,0,10)
    + iVolume(NULL,0,11) + iVolume(NULL,0,12) + iVolume(NULL,0,13) + iVolume(NULL,0,14) + iVolume(NULL,0,15)
    + iVolume(NULL,0,16) + iVolume(NULL,0,17) + iVolume(NULL,0,18) + iVolume(NULL,0,19) + iVolume(NULL,0,20)
    + iVolume(NULL,0,21) + iVolume(NULL,0,22) + iVolume(NULL,0,23) + iVolume(NULL,0,24) + iVolume(NULL,0,25)  
    );
x=(
       iVolume(NULL,0,1)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,1)
    + iVolume(NULL,0,2)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,2)
    + iVolume(NULL,0,3)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,3)
    + iVolume(NULL,0,4)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,4)
    + iVolume(NULL,0,5)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,5)
    + iVolume(NULL,0,6)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,6)
    + iVolume(NULL,0,7)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,7)
    + iVolume(NULL,0,8)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,8)
    + iVolume(NULL,0,9)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,9)
    + iVolume(NULL,0,10)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,10)
    + iVolume(NULL,0,11)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,11)
    + iVolume(NULL,0,12)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,12)
    + iVolume(NULL,0,13)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,13)
    + iVolume(NULL,0,14)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,14)
    + iVolume(NULL,0,15)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,15)
    + iVolume(NULL,0,16)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,16)
    + iVolume(NULL,0,17)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,17)
    + iVolume(NULL,0,18)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,18)
    + iVolume(NULL,0,19)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,19)
    + iVolume(NULL,0,20)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,20)
    + iVolume(NULL,0,21)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,21)
    + iVolume(NULL,0,22)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,22)
    + iVolume(NULL,0,23)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,23)
    + iVolume(NULL,0,24)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,24)
    + iVolume(NULL,0,25)*iMA(NULL,0,1,0,MODE_EMA,PRICE_WEIGHTED,25)
    )/v;

admin

  • Administrator
  • Hero Member
  • *****
  • Posts: 2386