Relative Content

Tag Archive for pine-scripttradingview-api

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.

(Pinescript question) Ignore first encountered short entry and enter next long entry. Is there a way?

In TradingView, I’ve integrated TradingView with Binance using alertMessage pinescript function. when Buying or selling condition is met, TradingView fires the signal to binance to place buy or sell order through alertmessage function automatically. The problem is that I only want to enter first met long and close at next short since the strategy I use is for the spot trading. not for the futures market.
So is there a way to ignore first encountered short entry and enter the next encountered long entry?