
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
What's FSM?
Finite State Machine
http://it.toolbox.com/blogs/the-other/tabledriven-finite-statetransition-machines-23255
https://en.wikipedia.org/wiki/Event_driven_finite_state_machine
Pastafarianism
don't forget to add mozzarella and tomato too
You're not missing anything in terms of performance. This form of multiple-chart arrangement does worry me, however, because an EA can get its own chart handle reliably, but there are many practical issues involved in one chart getting the handle of another chart.
WindowHandle(Symbol(), Period()) is more or less guaranteed to work regardless of what the user does. It even seems to work reliably if there are multiple charts for the same symbol and timeframe. Whereas, on the other hand, retrieving the handle of another chart requires four things to be configured/known correctly:
I'm not saying that that your suggestion #2 won't work in any sense - and I didn't give it enough attention first time round. But it would worry me in terms of the scope for user error.
I haven't actually considered the details... I was talking conceptually. But most of the problems you suggested might be solvable (I haven't given it enough thought either).
Anyway, I just now understood your idea - to call start() from within itself in the same EA (the first time I read it I thought u meant to call it from another EA...). Yeah, I see now how that would hog the CPU.
Edit: after further thinking about it, I doubt my number 2 idea can be done reliably... The margin for user error is too big.
Finite State Machine
http://it.toolbox.com/blogs/the-other/tabledriven-finite-statetransition-machines-23255
https://en.wikipedia.org/wiki/Event_driven_finite_state_machine
Oh. Been a while since Uni. :)
2. In the middle of the night [sods law/typically] when server connection lost and EA sees "!IsConnected()".
Do you just hang about [like if EA not enabled], waiting for reconnect?
When you are disconnected, there is NOTHING you can do. Just return, when it reconnects you'll get a new tick and a call to start()
If you're not getting many ticks it is because nothing is changing, there is NOTHING to do. just return and wait for start()
If you're getting a lot in internet failures - VPS.
If you're getting a lot of long disconnects it's your broker's fault - switch to a different broker.
The only time I see disconnects from IBFX is during the weekend and most of them last about a minute. The few others I see is related to non-redundant ISP in the lightning capital of the world (Florida.)