JoshuaMcGowan

Strategy Test - Cancel Limit Order and Position Sizing

JoshuaMcGowan Aggiornato   
While working thru another project had the need to troubleshoot the canceling of a limit order syntax/process as well as work thru the code and logic to automagically set the position sizing based off two user inputs (Amount to Risk in USD and Leverage to Use) and the potential entry and stop levels for an inside bar candle pattern in this scenario. Once we find the distance between the entry and stop level we can figure out the stop percentage amount which matches up with what a user would see manually drawing using the long or short tool in tradingview. Once we have the user inputs and levels we can get an amount to be used in later qty= type of places in zeeee pine script....
Note di rilascio:
The previous code didn't meet my specific trade setup requirements but left that information commented out in case it applies and is helpful to someone else down the road. Will be testing this new approach and see how it ends up going. This is by no means a finished product but the various code snippets should be of help to others looking for ways to approach this risk management question.

All the best. #PMAFTW

Learn: www.therationalinvestor.com/?discount=Fok7MHYJDi5JHvZD6A4MHej
Connect: www.linkedin.com/in/thejoshuamcg/
Support via BTC: 38fNVWomAePgeoMCBfeJmdivbdk14LZQNx
Script open-source

Nello spirito di condivisione promosso da TradingView, l'autore (al quale vanno i nostri ringraziamenti) ha deciso di pubblicare questo script in modalità open-source, così che chiunque possa comprenderlo e testarlo. Puoi utilizzarlo gratuitamente, ma il riutilizzo del codice è subordinato al rispetto del Regolamento. Per aggiungerlo al grafico, mettilo tra i preferiti.

Declinazione di responsabilità

Le informazioni ed i contenuti pubblicati non costituiscono in alcun modo una sollecitazione ad investire o ad operare nei mercati finanziari. Non sono inoltre fornite o supportate da TradingView. Maggiori dettagli nelle Condizioni d'uso.

Vuoi usare questo script sui tuoi grafici?