Relative Content

Tag Archive for pine-scripttradingview-api

Pine script misses crossovers

The following Pine script misses some crossovers in August and September 2024.
The histogram of the MACD ‘delta’ clearly shows the crossovers and I have even multiplied the delta by 1000.0 to no avail. What is the reason for this or is this a Pine script bug?

Tradingview Pine Script Close 9 Contracts and move to Break even

I have been working on a script that will take TP at 42 ticks then close 9 contracts leaving 1 contract left and move stop loss to break even. I feel like I’m close! But it’s not working when I test. Heres the code if anyone has any ideas on what I’m doing wrong

Tradingview Pine Script Close 9 Contracts and move to Break even

I have been working on a script that will take TP at 42 ticks then close 9 contracts leaving 1 contract left and move stop loss to break even. I feel like I’m close! But it’s not working when I test. Heres the code if anyone has any ideas on what I’m doing wrong

Tradingview Pine Script Close 9 Contracts and move to Break even

I have been working on a script that will take TP at 42 ticks then close 9 contracts leaving 1 contract left and move stop loss to break even. I feel like I’m close! But it’s not working when I test. Heres the code if anyone has any ideas on what I’m doing wrong

How to add start and end date in following pine script for back testing in trading view

I am totally new to pine script. i am totally unaware of how to do any changes in it. I have taken this strategy from trading view which i want to backtest. which is working fine but the only problem is it is taking 1990 as start date. i am unable to change the dates. and i dont know how to select dates manually. It is not visible in the script anywhere so i dont know how to do it. is there anyone who can explain to me how. and if you know from where i can get detail documentation of pine script so that i can learn it from the scratch. if you know please let me know.