You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I'm working on a script and it uses a form of martingale based on how many positions are open. The only problem is the code isn't working correctly. I've double checked it a million times but it just doesn't work correctly. Basically I'm trying to check if its buy or sell then count up each buy and sell but instead what is happening is its counting each open position as a "buy" even if its a sell. So my sells are always set to 0 and my buys seems to for some reason always represent how many total positions I have open. So if I have 6 trades open, 3 of them buy and 3 of them sell the script will return my values as 6 buys open and 0 sells. Here is the code, I'm almost 100% sure I wrote it correctly but apparently I didn't because the computer is saying otherwise.
I believe I have everything correct but its not calculating.