Reply

Problem with Stop Orders creating in EAWizard…

4 replies

Michael Ott

Subscriber, bbp_participant, community, 0 replies.

Visit profile

6 years ago #232652

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.

0

Michael Ott

Subscriber, bbp_participant, community, 0 replies.

Visit profile

6 years ago #232679

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #232683

Hello,

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

0

Michael Ott

Subscriber, bbp_participant, community, 0 replies.

Visit profile

6 years ago #232697

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

0

tomas262

Administrator, sq-ultimate, 2 replies.

Visit profile

6 years ago #232745

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

0

Viewing 4 replies - 1 through 4 (of 4 total)