Initialize your precioSup before the loop.
Okay. Well, I have rewritten the function. I can already get the opening price of an open position. But when there is more than one open position, the value is not updated, the first one that takes is kept. I put the code. Please someone help me. Sure it is silly, but being a newbie in programming I can not solve it. This is the code. Thanks
have you tried to update the totalOp = OrderTotal() and initialized precioSup variable immediately before the loop inside the "ordenSup" function ?
What did you mean by the value is not updated ? Where is the "ordenSup" function located in your code ?
have you tried to update the totalOp = OrderTotal() and initialized precioSup variable immediately before the loop inside the "ordenSup" function ?
What did you mean by the value is not updated ? Where is the "ordenSup" function located in your code ?
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi there. I am trying to obtain in a variable the maximum value of entry to the market of all the open positions. I've tried it with a for loop, going around it several times, but nothing. I can't get it to work. Could anyone help me? I pass you the code that was finally left ... Thank you all. Greetings.