Help needed coding EA - OrderSend errors
Page 1 of 842 12 LastLast
Results 1 to 10 of 12

Thread: Help needed coding EA - OrderSend errors

  1. #1
    3 Attachment(s) Hey guys,
    I am trying to code an EA for a specific egy but I am getting error codes. Such as OrderSend mistake 130 and OrderSend mistake 138 and such.
    So I'm wondering if some of you guys would be happy to help me out here.

    I also get things like this where it is not entirely accurate:
    https://www.forexforum.co.za/general...ents-euro.html
    and
    https://www.forexforum.co.za/trading...00-2008-a.html

    The egy is as follows:
    Engulfing candle needed to breach the Bollinger band.
    Entrance: 5 pips above/below near Engulfing candle.
    Stop: 5 pips above/below high/low of Engulfing candle.
    Goal: 2-1 Reward to Risk.

    Requirements:
    Engulfing candle has to shut above/below the high/low of previous candle.
    If we don't get entered through the subsequent 4 candles the transaction becomes invalidated.
    If candle type of Engulfing candle is large, use a preceding candle to base the Stop reduction off of.

    Here is the code I'm currently using:
    https://pastebin.com/jUWGDqdV

    Here are some results I got together with the code:
    https://www.forexforum.co.za/general...ty-knocks.html


    So if anyone want to try it out and determine what the issues are that could appreciated.

    Thanks!

  2. #2
    Hello Auntie Vi,

    This should go some way towards eliminating the mistakes.
    Just play it and adapt to your requirements.

    M.
    https://www.forexforum.co.za/attachm...2049646046.mq4

  3. #3
    Quote Originally Posted by ;
    Hello Auntie Vi, This should go some way towards removing the errors. Just play it and adjust to your needs. M. document
    I appreciate the hard work but I tested it and it doesn't appear to work.
    I'd try to mend it but I honestly have no clue what I am doing or what anything means.
    The only thing that I understand how to do is alter the conditions pretty much.

    So from the evaluation I did it opened A LOT of closed and trades them a moment afterwards or something which led to the evaluation taking a very long time.
    In the end results I only had about 10 trades that I understand is wrong and that I tried making the report which it did after a while however every time I try to start it my browser crashes.

    So I am not certain what the matter is.
    I did not see any errors so that is a good thing.

  4. #4
    Hey antivi, this code works for me....



    ticket=OrderSend(USDJPY,OP_BUY,H_Lot,MarketInfo(US DJPY,MODE_ASK),100,O_SL,O_TP,Auto-Trade,4141,0,Blue);

    hope this helps...

  5. #5
    Sorry did this while I was twiddling my fingers yesterday with an hour to spare.

    No time at moment but will return to it when I could if you do not resolve it.

    M.

  6. #6
    Quote Originally Posted by ;
    hey antivi this code works for me.... Ticket=OrderSend(USDJPY,OP_BUY,H_Lot,MarketInfo(US DJPY,MODE_ASK),100,O_SL,O_TP,Auto-Trade,4141,0,Blue); hope this helps....
    I appreciate the hard work but that's not likely to help since I have something very like this.


    Quote Originally Posted by ;
    Sorry did this while I was twiddling my fingers yesterday with an hour to spare. No time at moment but will come back to it when I could if you don't resolve it. M.
    I will keep playing around with it and attempt to resolve it.
    Should I do I'll make a post here.

    I'm not a programmer so the chances of me making it work are slim but I will give it a chance.

    Thanks again!

  7. #7
    Hi Vi,

    Sorry thought you're a programmer as you supplied original code.
    Should be a bit better today but have not assessed or altered the logic of what you're doing.
    Cannot replie your results :--LRB-

    Hope it helps.

    M.
    https://www.forexforum.co.za/attachm...1525371979.mq4

  8. #8
    Quote Originally Posted by ;
    Hi Vi, Sorry thought you were a developer as you supplied first code. Should be a little better today but have not checked or changed the logic of what you were doing. Cannot replie your results. M. document
    Hehe No problem! I simply didn't want to ask people for help until I gave it a shot myself.
    The outcomes will not be exactly the same since the code I had wasn't perfect.

    I did do a test and every single setup seems to be correct as well as those who timed out and the results seem quite similar.
    The single thing that it does that it shouldn't isn't accepting setups if a transaction is already going on.
    Usually when I enter a new position I close the old one but I am not certain if that is possible in the code.

    Another thing I want to ask if you would like to do is if it is possible to explain what everything exactly does in the code so that I can understand it a little better?
    If you don't mind of course.
    I don't wish to ask more than that I already have.


    Thanks a lot!

  9. #9
    Vi,
    Try attached. Do not have time to play this to you may not work as planned.
    You've added new conditions on top of original request which never cheers me up!

    No time to explain everything, persevere and you will receive there.

    Allow me to know which pieces you need explaining.

    M.
    https://www.forexforum.co.za/attachm...7203847796.mq4

  10. #10
    1 Attachment(s)
    Quote Originally Posted by ;
    Vi, Attempt attached. Don't have time to play this for you so may not work as planned. You've added new conditions on top of original request which never cheers me up! No more time to explain everything, persevere and you'll receive there. Allow me to know which pieces you need explaining. M. file
    Oh wow that's absolutely perfect!
    Thanks so much!

    As for results, here is the first result:
    https://www.forexforum.co.za/general...-big-deal.html

    These results seem a lot smoother than the other ones nevertheless it's much less profitable however the cash management I do will really make up for that since I would be able to change my lot dimensions more often.
    I shall do a big round of optimizing tomorrow and find out if some better parameters are available.

    As for understanding the code, I'll deepen myself into it a little and find out what I could figure out and what I can't since this will take some time.
    Additionally sorry for the inconvenience!


    Thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
This website uses cookies
We use cookies to store session information to facilitate remembering your login information, to allow you to save website preferences, to personalise content and ads, to provide social media features and to analyse our traffic. We also share information about your use of our site with our social media, advertising and analytics partners.