2701ag:
Hi there,
I have the following problem with my EA:
It opens a trade when trade signal is hit (lets say 'long'), when that trade is finished (TP or Sl) it waits until signal turns to short and then opens a short position. It SHOULD keep on trading as long as the signal is valid, although there should only be one trade open at time of course. So i would be able to profit from the whole trend, and not only once...
Does anyone have an idea if / how this is possible???
Many many thanks :)
Don't set a TP and wait reverse signal.
Hi there,
I have the following problem with my EA:
It opens a trade when trade signal is hit (lets say 'long'), when that trade is finished (TP or Sl) it waits until signal turns to short and then opens a short position. It SHOULD keep on trading as long as the signal is valid, although there should only be one trade open at time of course. So i would be able to profit from the whole trend, and not only once...
Does anyone have an idea if / how this is possible???
Many many thanks :)
When you open a trade hold the ticket number in a static variable, check that ticket number is still open using OrderSelect() SelectByTicket. If it is closed, and if signal is still long open another one.
SDC:
When you open a trade hold the ticket number in a variable,
in addition:
if i may, use globals in case you have/must restart the EA/computer/terminal
SDC:
if it is not open it must have been closed, so if signal is still long open another one.
if it is not open it must have been closed, so if signal is still long open another one.
in addition:
you can check OrdersHistoryTotal too
Thanks so far, i will try this, do my testing and see how far i will get :)
Thank you!!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I have the following problem with my EA:
It opens a trade when trade signal is hit (lets say 'long'), when that trade is finished (TP or Sl) it waits until signal turns to short and then opens a short position. It SHOULD keep on trading as long as the signal is valid, although there should only be one trade open at time of course. So i would be able to profit from the whole trend, and not only once...
Does anyone have an idea if / how this is possible???
Many many thanks :)