Hi, i recently paid someone to code me an EA. Can someone please assist me with understand the following lines.
Based on other indicators as well as the Moving Average, this function is used to work out how many of the current open positions should be closed based on how well the trade is currently meeting the TP criteria, eg 80 RSI would make it very overbought so (based on other indicators too) it would likely close most of the open positions.
I understand most of the code aside from the lines with ??? in the comments and how the tradeDirection dynamic array is used. Bonus question is this the best use of the array ? surely there are simplier ways to make it work eg the same array with values 1 & -1 to clearly identify buying or selling.
I appreciate the help in advance!
ArrayResize(tradeDirection,ArraySize(tradeDirection)+1,0);
sum_of_indicator_risk_valuesTP+=risk_value;
Cheers, sorry about that, ill try to provide more information next time

- 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, i recently paid someone to code me an EA. Can someone please assist me with understand the following lines.
Based on other indicators as well as the Moving Average, this function is used to work out how many of the current open positions should be closed based on how well the trade is currently meeting the TP criteria, eg 80 RSI would make it very overbought so (based on other indicators too) it would likely close most of the open positions.
I understand most of the code aside from the lines with ??? in the comments and how the tradeDirection dynamic array is used. Bonus question is this the best use of the array ? surely there are simplier ways to make it work eg the same array with values 1 & -1 to clearly identify buying or selling.
I appreciate the help in advance!