molanisfx wrote:
In metatrader Lines are more difficult since you need to manage object and indicators.
Comment will be your best option -- maybe you can add it at the end of your code that gets the price, use some time info to see when the data is obtained.
Something like
Comment("Molanis: Price:",pricevar," starts running at: Server Time=",TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS)," Terminal Time=",TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS));
Ok, I placed
Comment("Molanis: Price:",pricevar," starts running at: Server Time=",TimeToStr(TimeCurrent(),TIME_DATE|TIME_SECONDS)," Terminal Time=",TimeToStr(TimeLocal(),TIME_DATE|TIME_SECONDS)); directly into the MQL Block, right at the end of the code (as you suggested) and of course, the MQL block would not validate the code as being correct. I removed the segment of code you just gave me and the MQL block went back to validate as "OK".
So, I've got an MQL Block that works perfectly, but apparently I have no way to actually use the output that it generates. I think this really does go back to my suggestion of further integrating the MQL Blocks into Strategy Builder.
It would be really supportive to the trader, if you could easily display the value from an MQL Block within a chart, using any number of graphic elements (lines, arrows, etc.), and be able to use that same value within any TA+ Block as one of its operands.
I was able to create the output from the MQL Block using Excel, and it took roughly 30 minutes to finish:
Both values (BuyZone and SellZone) are what I need painted on screen:
It was really simple to do in Excel. If there was a way to both paint the chart with the value, and use the value in a TA+ Block Operand, it would send the usefulness of Strategy Builder through the roof for me as a trader. Think about what it does. It allows the trader to create custom trade logic and then use and display the output from that custom logic, within the EA itself. That really does open the door for traders to do some pretty amazing things with Strategy Builder.
Right now, you are unable to access or use that output within a TA+ Block, nor can you easily display the output from an MQL Block on the chart.
Hopefully, this gives you some hints about ways in which MQL Blocks could be more integrated within SB overall.
Thanks for the help!
cfx