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
Thank you for correcting.
This part of the code added because, if highest high got changed, then calculation of S1 will be different. That's why to added the condition to check, if its true, then delete the pending order. If any better way is possible then please share.
You are not checking if the highest high has changed, you are checking if Bid is > than the day high which is, of course impossible.
But of course, this section of code will never be executed anyway.
it is in the same block of code that will only be executed when the condition is met that Bid is more than 20 pips below the days high
It's basically the same as
which doesn't make sense as it can never be true.
If you want to use the condition
Then it will HAVE to be before
About OrderSelect area, i deleted the orderclosetime part. Now will it be ok? I tested it.
Now about this part (corrected) is say high is 1.3680 bid is at 1.3659 greater than 20, so S1 is 1.3680-40=1.3640. It will place Buylimit. But if bid is below the S1 then it will place buystop, ( I checked the tester, sometimes it was giving ordersend error, so that's why added this condition)
Lastly about the Ticket < 100 condition, i added it because, i want to take only 1-2 trades per day.
Now you select an order and do nothing with the select?
I asked you what happens if the OrderSelect fails? See this example
Get into the habit of using
I don't see how the condition Ticket<100 means you will only take 1 or 2 trades per day.
Ok corrected again. Working ok. But one thing is, in tester i see "report the problem " constantly. I guess orderselect is getting failed most the time. That's why its not coming to 2nd condition.
Why orderselect is getting failed, no idea.
Another thing, i am testing it on past data, i guess lowest will never get changed in this case. So orderdelete for the change has no use, right?
Thanks again.