EACreator.com Forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.
EACreator.com Forum

EA Creator - Automate your forex strategies without programming www.EACreator.com


You are not connected. Please login or register

How to trigger Trade on Price "touching" Line (Ask or Bid?)

2 posters

Go down  Message [Page 1 of 1]

old_forum_question



Dear Support Team,

I need to create an EA where the Exit (Take Profit) is once Price reaches a certain line.

Let's use Bollinger Bands as an Example. Should Price go up and "on touch" (crossing) the Upper Band, the Trade should be closed (Take Profit Level).

How can i do this? I've tried with Candle High => Upper Band, Shift = 0 (Current Candle), but this is not closing at the present candle, it waits for the next candle to see if the High was higher or Equal, therefore the Trades close losing Pips in the Process.

I know that I could use Bid or Ask = Upper Line, but do not know which one to use.

I assume I would use Ask for Long Trades and Bid for Short Trades, but I am not sure about this.

Can you help?

old_forum_answer



old_forum_question wrote:Dear Support Team,

I need to create an EA where the Exit (Take Profit) is once Price reaches a certain line.

Let's use Bollinger Bands as an Example. Should Price go up and "on touch" (crossing) the Upper Band, the Trade should be closed (Take Profit Level).

How can i do this? I've tried with Candle High => Upper Band, Shift = 0 (Current Candle), but this is not closing at the present candle, it waits for the next candle to see if the High was higher or Equal, therefore the Trades close losing Pips in the Process.

I know that I could use Bid or Ask = Upper Line, but do not know which one to use.

I assume I would use Ask for Long Trades and Bid for Short Trades, but I am not sure about this.

Can you help?

Sell order closing price is "Ask" and buy order closing price is "Bid" (for opening orders it would be vice versa: Ask for buy and Bid for sell).

You can create the folowing closing signals:
Close Buy: Bid > Upper Band, Shift = 0 (Current Candle),
Close Sell: Ask < Lower Band, Shift = 0 (Current Candle).

Of course you can do it vice versa, it would also work, just orders would be closed a bit earlier depending on spread.

old_forum_question



Hi,

Just to make sure, what I should follow to open orders Sell/Buy based on same senarioa.

old_forum_answer



old_forum_question wrote:Hi,

Just to make sure, what I should follow to open orders Sell/Buy based on same senarioa.

If rules are same and you want them for opening orders, then create them in "Open Buy" and "Open Sell" pages.

Sponsored content



Back to top  Message [Page 1 of 1]

Permissions in this forum:
You cannot reply to topics in this forum