Forum

How to work out if a Symbol is an index?

I have a couple of scripts that calculate the lot size depending on risk % and SL distance. sl=m_symbol.Ask()-Stop_Loss_POINTS*point; Is there a way to somehow work out if I'm calculating lot size for a forex pair, or for an Index. I get the point from SymbolInfo ... which works for forex pairs

How to execute script to draw horizontal lines on all charts

My script looks for a couple of trendlines with specific names and draws another line on top of it, which can then be seen by an alert function . I am able to execute that script on the current chart, but I want this to do that on every chart. How do I do that? #property copyright "Copyright 2018"