
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
Plus the reverse trade on stopped orders is also not working.
You've already been told about this being unreliable
This does nothing
You return if it is a new bar and also return if it isn't, so you always return without doing anything.
When you do find a new bar, you need to reset the value.
Your code for checking the last order assumes that the highest index in the order history is the latest closed trades. I am not sure if this is always true.
Ok I applied the code...but when i try to call the start function at each new bar...its not taking any order...
Even if I add buyCall & sellcall function inside new bar zone..& start() inside the tick zone...its creating multiple orders.
Along with this start function...i have following extra function..which get called in main function.
int split(double x)
void BuyCall(double BC)
void SellCall(double SC)
& lastly void onTick function about which i am confused...how to set it in a way..that will not repeat pending orders tick by tick
..just one sequence of pending orders in each hour...plus it will check if any pending order got stopped out
..then it will open another trade in opposite direction..but just one sequence per hour.
Please help just stuck in same area over and over again...but obviously wants to learn...so that i don't need to ask silly question in future
...want to clear my concept..:(
Thank you for your time.