Results 1 to 2 of 2
 0 Attachment(s)    

Thread: (Help) How to add levesl to MA code?

  1. #1

    Default (Help) How to add levesl to MA code?

    hi,

    how would i add levels to this MA code?

    double SMA1=iMA(Symbol(),0,50,0,0,PRICE_HIGH,shift);


    eg SMA is at 50 period, how to add levels above and below
    at 100, 200 ,300 and -100, -200, -300 ?

    thanks,
    Zoop

  2. #2
    Administrator funyoo's Avatar
    Join Date
    Sep 2008
    Posts
    7,003

    Default

    Quote Originally Posted by zoop View Post
    hi,

    how would i add levels to this MA code?

    double SMA1=iMA(Symbol(),0,50,0,0,PRICE_HIGH,shift);


    eg SMA is at 50 period, how to add levels above and below
    at 100, 200 ,300 and -100, -200, -300 ?

    thanks,
    Zoop
    Hi zoop,

    You just need to add :

    ...
    double Levelminus100=SMA1-100*pt;
    double Levelplus100=SMA1+100*pt;
    double Levelplus200=SMA1+200*pt;
    ...

Similar Threads

  1. Can anyone Code this EA?
    By pret1102 in forum Softwares
    Replies: 1
    Last Post: 03-21-2012, 04:26
  2. Need Code for S/L and some more
    By Monkesy in forum Ideas for expert advisors
    Replies: 0
    Last Post: 04-05-2011, 11:30
  3. Please help me to code this EA
    By sshirbhate in forum MQL programming
    Replies: 2
    Last Post: 03-21-2011, 13:03
  4. Help my code
    By fellargasi in forum MQL programming
    Replies: 0
    Last Post: 10-27-2010, 19:37
  5. How to code MA on RSI in an EA ?
    By funyoo in forum MQL programming
    Replies: 0
    Last Post: 11-17-2008, 20:03

Tags for this Thread

100, add, high, how to, sma

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •