Forum

daily percantage change of stocks

Hi, today I encountered an issue when comes to calculating the order's performance. Assuming I would have bought stocks at 100$ and sell 105$ the gain is 5% according to foll equation (sold price - buy price)/buy price*100 = 5.00% However, considering the following price history I would get a

MA and RES/SUP strategy

Hi, I am working on a trading systems based on MAs and Sup/Res levels. The idea is if án MA and SUP/RES are very close to each other and price touches that level and bounces back to open an order. One could code that like this: if(low < MA && low < RES level && close > MA && close > RES level)

Bcktest doesn't work ERROR 4202

Hey Guys, Can someone please explain to me why I always get ERROR 4202 whilst backtesting. I use two indicators drawing trend lines and horizontal lines . Apparently the EA is not able to process the those objects. Many thanks for any help. See the attached files

store value in for-loop

Hi guys, is it possible to store a value inside a for-loop so that I can use this value for further calculations outside the for-loop

Need help with my S/R indicator

Hey Guys, I wrote this Indicator showing Support and Resistance Lines in the 15min which works perfectly fine. I also want to see these lines in the 5min TF. But when I switch to the M5 TF other lines appear which are not supposed to be there.. Can someone help me out, please? extern int

Order openings at wrong points

Hey guys, I coded an indicator that creates Support/Resistance lines. Now I've tried to create an EA which opens orders directly when market price touches a Support/Resistance lines. For some reason the orders are not being placed directly at the lines. Can somebody help me, please? Here's my code

How to limit bars an indicator uses

Hey, I wrote an indicator displaying me lines at highs and lows. Unfortunately, I get hundreds of lines as all bars of the chart are processed. I would prefer if the indicator just processes the last 500 bars or so. For the sake of convenience I've just inserted the part with the resistance. Can