Not logged in
Viewing 5 posts - 1 through 5 (of 5 total)

Forums>AlgoWizard / EA Wizard>Application Support>Problem with Stop Orders creating in EAWizard…

  • #232652 |
    Participant
    3 Posts

    Hello,
    I have a problem with EAs where I signal a stop order. I have created several EAs, e.g. with Ichimoku at crosses of Tenkan and Kijuns, or also with the supertrend indicator. But I do not want to go in with a market order right now, but instead issue a stop order. I then created the EA with “enter at stop” instead of “enter at Market”. At first glance, they seemed to work, but looking closer, I noticed that not all orders were placed. Since I also created an arrow with every purchase action, you could follow it closely. The arrow was drawn in the chart, but no order opened. Not only in backtest but also in live trading! The signal came, the action was executed, the arrow was there … but not an order. In the journal and in the log file was also not to be found. I used the simple EMACross example in EAWizard. But instead of a market order created a stop order. Also with this EA not all orders are executed! Can someone of you experts look at it, if there is a bug in the translation of the code of the StopOrder? I’m really at a loss, I can not get any further.

    (I am German, I used Google translator. Excuse me)

    Michael

    Attachments:
    You must be logged in to view attached files.
    #232679
    Participant
    3 Posts

    Hello,

    I found the mistake! Of course, for the long signals that went in the right direction, the stop-buy limit was below the current price. Thus, the pending order was incorrect and was not transmitted at all. (In the short signals, of course, just opposite) Unfortunately, but no error was written to the log file. However, if I read this out correctly from the programming, a message would have come:

    ——————

    // check if stop/limit price isn’t too close
    if(NormalizeDouble(MathAbs(price – AskOrBid), Digits) <= NormalizeDouble(getStopDifferencePrice(orderMagicNumber)/gPointPow, Digits)) {
    Verbose(“Stop/limit order is too close to actual price”, ” —————-“);

    ——————-

    Had me of course spared a lot of search. Now I have just created two different buy orders. A Stop order if ASK <Close (shift1); and a Market if ASK> Close (shift1). Or is there a more elegant solution?

    Greetings from Germany,

    Michael

    #232683
    tomas262
    Administrator
    1826 Posts

    Hello,

    I would do it the same way as you. A stop order or a market order depending on distance

    #232697
    Participant
    3 Posts

    Hello Tomas262,

    Thanks for the feedback. But, As I said, should have actually come to an error message? If the stop limit is above / below the current price ?! See above…:
    -> Verbose (“Stop / limit order is too close to actual price”)
    Can you control it if there is a mistake?
    Thank you

    Michael

    #232745
    tomas262
    Administrator
    1826 Posts

    Hello Michael,

    you might check another thread on this https://strategyquant.com/forum/topic/5832-stoplimit-order-too-close-to-actual-price/#post-141685

    Let me know if any questions

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.