Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 42
  14 14 Attachment(s)    

Thread: Hma power vs Heiken Ashi

  1. #31

    Arrow

    I write this code,

    } else { mylotsi=lotsi; }
    if(mylotsi<=80)OrderSend(Symbol(),OP_BUY,mylotsi,N ormalizeDouble(BuyPrice,Digits),slippage*mt,sl,tp, "MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    if(mylotsi>80 && mylotsi<=160){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-80,1),NormalizeDouble(BuyPrice,Digits),slippage*mt ,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>160 && mylotsi<=240){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-160,1),NormalizeDouble(BuyPrice,Digits),slippage*m t,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>240 && mylotsi<=320){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-240,1),NormalizeDouble(BuyPrice,Digits),slippage*m t,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>320 && mylotsi<400){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-320,1),NormalizeDouble(BuyPrice,Digits),slippage*m t,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>=400 && mylotsi<480){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-400,1),NormalizeDouble(BuyPrice,Digits),slippage*m t,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>=480 && mylotsi<560){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-480,1),NormalizeDouble(BuyPrice,Digits),slippage*m t,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>=560 && mylotsi<640){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-560.2,1),NormalizeDouble(BuyPrice,Digits),slippage *mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>=640 && mylotsi<720){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-640.2,1),NormalizeDouble(BuyPrice,Digits),slippage *mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }
    if(mylotsi>=720 && mylotsi<800){
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,80,NormalizeDouble(BuyPr ice,Digits),slippage*mt,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    OrderSend(Symbol(),OP_BUY,NormalizeDouble(mylotsi-720,1),NormalizeDouble(BuyPrice,Digits),slippage*m t,sl,tp,"MyMEFx EA"+MagicNumber,MagicNumber,0,ArrowsColor);
    }

    return(0);
    }



    but the ea has a different entry in the market (i don't have understood why) anyway with my code it skips some position ....Help Funyoo plz;

    Last edited by 823; 12-29-2009 at 19:03.

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

    Default

    Hi 823,

    Are you sure that the multiplier value is correct ? I don't see what could be the reason otherwise.

  3. #33

    Default

    Quote Originally Posted by funyoo View Post
    Hi 823,

    Are you sure that the multiplier value is correct ? I don't see what could be the reason otherwise.
    The value is set to 2.

    Can you chek the code to understand where is the mistake please?

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

    Default

    Quote Originally Posted by 823 View Post
    The value is set to 2.

    Can you chek the code to understand where is the mistake please?
    Do you have some error messages in the journal ?

  5. #35

    Default

    Quote Originally Posted by funyoo View Post
    Do you have some error messages in the journal ?

    with your version NO!
    Just the size and the sequence of the lots is uncorrect.
    I'm sure if you can test the ea you will solve the problem

    I have modified myself the code above but i'm unable to write mq4 language

  6. #36

    Arrow

    Quote Originally Posted by funyoo View Post
    Do you have some error messages in the journal ?
    Hi Funyoo,


    I have made a lot of attempts also today but i have no positive results;
    as you can see from the images above the system open error size of lots and then it doesn't open more order (even if it wuold be required and margin is free); Anyway no errors on the journals.

    I have made this attempts, can you chek the code to understand where is the error???

    hma_power2.13.mq4


    Thank you very much funyoo

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

    Default

    Quote Originally Posted by 823 View Post
    with your version NO!
    Just the size and the sequence of the lots is uncorrect.
    I'm sure if you can test the ea you will solve the problem

    I have modified myself the code above but i'm unable to write mq4 language
    Hi 823,

    I have rebuilt the OpenMarketOrders function. The structure was not compatible with the division of the lots size.
    Attached Files Attached Files

  8. #38

    Default

    Quote Originally Posted by funyoo View Post
    Hi 823,

    I have rebuilt the OpenMarketOrders function. The structure was not compatible with the division of the lots size.

    Hi Funyoo,

    the ea is better, but from 12th positions the lot size is uncorrect :


    can you re-insert 0.01 lots (only 0.1 lots on v2.13) and try to resolve the problem?


    thanks

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

    Default

    Quote Originally Posted by 823 View Post
    Hi Funyoo,

    the ea is better, but from 12th positions the lot size is uncorrect :


    can you re-insert 0.01 lots (only 0.1 lots on v2.13) and try to resolve the problem?


    thanks
    Hi 823,

    The last lots size is the difference between the global lots and the [global lots / maxlots normalized] in order to get as a final result the global lots.

    You just need to put minlots=0.01 and lotdigits=2 to have micro lots.

  10. #40

    Smile

    Quote Originally Posted by funyoo View Post
    Hi 823,
    Hi Funyoo,

    The last lots size is the difference between the global lots and the [global lots / maxlots normalized] in order to get as a final result the global lots.

    You just need to put minlots=0.01 and lotdigits=2 to have micro lots.
    Ok it works quite well, just a little difference here:

    start from 0.01 lots:

    0,1 ok
    0,2 ok
    0,4 ok
    0,8 ok
    1,6 ok
    3,20 ok
    6,40 ok
    12,8 ok
    25,6 ok
    51,2 ok
    102,4 ok
    204,8 as you can see from the image above, the ea sell 240 lots instead of 204,80 lots! have you discover that? is it possible to fix the problem?
    409,6 ok

    thanks
    Last edited by 823; 12-30-2009 at 23:29.

Similar Threads

  1. Heiken Ashi 5m
    By Richard Dennis in forum Ideas for expert advisors
    Replies: 1
    Last Post: 09-15-2015, 18:51
  2. Heiken Ashi Indicator Explained What are Heiken Ashi?
    By painofhell in forum Trading discussion
    Replies: 0
    Last Post: 12-21-2014, 23:16
  3. Heiken Ashi EA v3
    By funyoo in forum Expert advisors backtesting
    Replies: 0
    Last Post: 09-20-2009, 19:05
  4. Heiken Ashi EA
    By aly2000 in forum Ideas for expert advisors
    Replies: 1
    Last Post: 06-22-2009, 18:13

Tags for this Thread

100, backtest, backtesting, broker, change, forex, forex broker, forex4you, free, funyoo, heiken ashi, magic, main, martingale, mq4, pips, power, profit, real, slippage, stoploss, system, test

Posting Permissions

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