auto draw on symbol change
-
on metatrader4 i am able to change symbols by dragging and dropping onto chart with EA preloaded and it will draw fibonacci each time. however it does not work on init in metatrader 5. Can anyone offer assistance? https://fxdreema.com/shared/RY7JvNbB
-
I don't see any ptroblem there. Are those the only blocks used on the 'on init' tab?
-
yes they are. they work the first time but when i drag and drop another symbol on the chart it does not draw again
-
Do you mean opening a second/third/fourth symbol? This is because you are not opening the bot on those new symbols. Each symblo must have the bot running on it. Running the bot on one only symbol will make it work on that symbol only.
-
i mean dragging a new symbol onto the chart that is currently running the bot. example: chart is running EURUSD and draws Fib i then opt to change the symbol by dragging and dropping a new symbol onto the same chart that is currently running the bot. on mt4 it automatically redraws fib when new symbol its applied but not mt5
-
on init only works on EA initialisation (bot start) so doesn't work after, you have to add blocks on tick.
-
@drewliedadeuce
As @jstap mentioned.
The On Init means initialization ( once the EA is loaded to a chart, it starts )
Your EA has already started, so there's no initialization again, even when you add or change anything on the chart ( unless you remove and re add your EA, the Init will start again )If you change anything there after, it should be in the OnTick ( searches for anything within every tick (( per second )) to alter on the chart )
So if you change the symbol on the same chart, the OnTick will detect a change and redo whatever the command is. -
Awesome Thank you