[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 190
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
It's the same, but it's easier (more familiar) to read the code.
I'm too lazy to figure it out, but someone will easily find a mistake in your code without straining. Just wait.
Sometimes a message appears in the logbook:
invalid price 1.37197000 for OrderSend function
What could this be about? It appears after the stop loss has been reached.
the wrong price is 1.37197000.
the correct price is 1.37197 or 1.3719, depending on which DNS.
To set the number of digits after the decimal point NormalizeDouble() is used
How can I trace the opening of a new bar in int start()?
I need the code to be triggered not on every tick but only after a new bar is opened
If the time of the bar is not the same, it means that the bar has changed.
if it is not equal, it means the bar has changed - do what you need to do and remember the time.
Who has used isCloseLastPosByStop() or isCloseLastPosByTake()? Show how you did it.
Could you please advise how to load indicator on a chart programmatically?
There is the function bool ServiceLoadCustomIndicator(int hwndChart,...); //hwndChart- System descriptor of the chart window, where the indicator is loaded.
I don't know how to know the chart window descriptor.
I just need to remember GetTickCount on the first tick after the start of the indicator, but the code below doesn't work - the terminal hangs. Maybe in init() RefreshRates doesn't work at all...?
Who has used isCloseLastPosByStop() or isCloseLastPosByTake()? Show me how you did it.
It couldn't be simpler:
Place functions themselves outside of the function start(), you can even at the end of the whole code.
so at least a bit of live video will add to the experience of future programmers here
Your posts are deleted, you have been warned.
This is as easy as it gets:
Place the functions themselves outside of the start() function, or at the very end of the whole code.