
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
High[2]-Low[2] wil give the range of candle 2 only.
i see why this is not working. it is cancelling everyorder automatically every half hour in stead of letting the market stop it out or take profit. i see a lot of orders that would have paid out but the robot closed the order. if that can be changed i think the results will be better
Yes it closes a running trade on the opening of a new bar.
To stop it doing this modify the follow line.
From
CloseAllOpenOrders(); //first close any existing trades left over from previous bar
To
//CloseAllOpenOrders(); //first close any existing trades left over from previous bar
It simply rems out the request to close the trade. The trade will then run until stopped out or a profit is take. No new trade will be taken during this period.
As for your question about the 2 hour candle
This should be possible by running against a one hour chart and taking into account the max and min of the last two bar to calculate the range over two hours.
I'll think about it for the moment and get back to you.
Would you still be looking for a 20 point range over the two hours ???????
Regards
Brendan
Thanks brendan for the code.
I have yet to test the code but seems that if you activate the EA, will it execute an order immediately if all rules are met even if the current price is like 10pip above the previous bar already.
Well spotted. You are quite right a trade will be executed on open of a bar if all rules are meet. No account is taken for gapping.
Thanks brendan for the code.
I have yet to test the code but seems that if you activate the EA, will it execute an order immediately if all rules are met even if the current price is like 10pip above the previous bar already.
Well spotted. You are quite right a trade will be executed on open of a bar if all rules are meet. No account is taken for gapping.
Perhaps crazfoto could tell us how he/she handles gapping in the manual method
Regards
Brendan