Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
I want to create a code for scaling in if the same conditions are met 3 times.
i.e., if there is a buy signal and again BUY signal conditions are met before SELL (LongExit) condition, then the system could take the BUY signals upto 3 times and then exit all at the SELL condition.
i have a code which works like this but it generates 3 signals on 3 continuous candles which leads to losses. have attached image for clarity.
now i need to create a code which waits for a certain number of candles before scaling in.
somebody please help!
Can you help answer these questions from other members on NexusFi?
I am not sure to understand you correctly. I guess you want to scale-in every time you get a Buy signal, up to 3 times. And sell your whole position when you get a Sell signal. But you also want to wait for n bars after last Buy signal before buying more. In that case,
let's say your long signals are given by a BuySignal variable and your sell signals by a SellSignal.
Similarly for the short side. I haven't check code but it should be ok. Have fun.
thanks a lot for your reply. the code is not working though. it is generating only one buy signal instead of three. i will see what can be done now. thanks again.