Hi Claus, if there isn't a specific reason for using arrays, you could simply define the list as "var string" variables and use these as the inputs to your request security function. It might be easier. https://www.tradingview.com/pine-script-docs/en/v5/language/Variable_declarations.html?highlight=...
Hi Dark Trader, I looked at your code, you are using the strategy.exit function for your stop loss (which uses a stop order to trigger your SL) but you are using the strategy.close function to trigger your take profit. The strategy.close function uses market orders (instead of limit or stop orders) ...
Hi pinecat, you can access the different prices (open, high, low, close) of historical bars with the following operators - []: This code for example references the close of the previous bar close[1] Maybe the free basic pine course of Matt would be a good staring point for you to learn pine. https:/...
Hi there, as far as I know and understand it, the logic behind the alerts is that they trigger once the coded condition for the alerts becomes true. If I want a specific alert to trigger first, I would focus on the underlying condition that has to become true first and change the code accordingly .....
Hi zwp, from your picture i guess you plotted to built in MFI indicator at the bottom of your chart right? If you check the source code of that indicator you will see that in that script the hlc3 ((high + low + close)/3) is used for the calculation and you used the close price in your script. That i...
Hi grdnryn, it is a bit difficult to help without seeing the entire code, I am not sure i understand exactly what you want to do. But one thing i noticed in your code is that in your if statement you compare current values to index values, is that intentional? if (high[i] < HH75 and low[i] > LL25) i...