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
Example:
Result:
Ok!
When I tried this code I received a lot of errors.
Ok!
When I tried this code I received a lot of errors.
#21
Hi Vladmir
Tks again for your help!
I used your code but receive the same result.
I had executed the backtest to 10 months and itthe made a lot of orders.
I would like to do the sequecen bellow.
1 - I buy one stock / Price - $20 / StopLoss - $20 / Takeprofit - $21
This order will be executed and if I tried to see if have one orderopen I will receive return > 0 correct?
2 - If the order rise to $21 ou $22 the MQL5 will send a order to sell or buy correct? this is a orderopen?
3 - After it if I want to send a new order to buy one stock / Price - $22 / StopLoss - $24 / Takeprofit - $22
I cannot submit a new order if I have a StopLoss or Takeprofit waiting to be executed.
Hi Vladmir
Tks again for your help!
I used your code but receive the same result.
I had executed the backtest to 10 months and itthe made a lot of orders.
I would like to do the sequecen bellow.
1 - I buy one stock / Price - $20 / StopLoss - $20 / Takeprofit - $21
This order will be executed and if I tried to see if have one orderopen I will receive return > 0 correct?
2 - If the order rise to $21 ou $22 the MQL5 will send a order to sell or buy correct? this is a orderopen?
3 - After it if I want to send a new order to buy one stock / Price - $22 / StopLoss - $24 / Takeprofit - $22
I cannot submit a new order if I have a StopLoss or Takeprofit waiting to be executed.
Use the code from #21 .
This is the basis of the skeleton.
A check must be added to this skeleton. A lot of checks.
But the main idea will be this:
Added: it is possible to complicate the logic - the trade order "place a pending Buy stop order" is issued only if there are NO pending orders in the market and if there are NO positions in the market.