Forum

How to get the pixel values from a chart.

Hello. I am trying to get the pixel values from a chart to use in a convolutional neural network but I don't know where to begin. How do I get the pixel values

Does ChartOpen() and ChartSetSymbolPeriod() work in the strategy tester?

When working with the strategy tester , ChartOpen() returns 0, and does not open a new chart. However, it works fine on the terminal. Does it usually work on the strategy tester? Thanks

PlaySound not working

When I try to play sound using code it doesn't work. //+------------------------------------------------------------------+ //| Script program start function | //+------------------------------------------------------------------+ void OnStart () { if (

How do I write a structure containing dynamic arrays to a file?

Is it possible? If so, what am I doing wrong? struct test { int zero; int one[]; double two[]; }; test guy; //+------------------------------------------------------------------+ //| Script program start function |

Must the indicator appear when running an EA?

I have an EA that uses zigzag. When testing it out in the strategy tester , the zigzag lines appear so I can watch what is happening. However, when I load the EA on to the charts, the zigzag lines do not appear. Are they supposed to appear

OnTick Critical Error

Hello, I keep getting the runtime OnTick Critical error when I try to test my ea. Here is part of the code; double cci[]; double rsi[]; double prev_volume, prev_AvD, prev_holdthese, prev_cci; double volume, AvD, holdthese; int OnInit () { MqlRates rates[]; int totalbars=Bars(_Symbol,_Period);

How to find the time that price reached a certain level

Hello. Is it possible to find the time that price reached a certain level? I understand that we can easily find the OHLC prices using time, but what if I want to find the time using price. Let me elaborate: lets say: Open=4USD. High=10USD. Low=2USD. Close=8USD. The open and the close prices depend

From a file to an array.

Hello. I am trying to copy data from a file to an array but even with the documentation and similar topics I can't seem to point out where the problem is. double destination[]; ResetLastError (); int handle= FileOpen ( "Ratio Data.csv" , FILE_READ | FILE_CSV ); if (handle!= INVALID_HANDLE )

Switch Operator

Hello. Hope you are well. I am trying to use figures from a switch operator elsewhere in the program but i am having a hard time figuring out how to do it. To properly explain, here is part of the code: break ; case Peak: // search for peak if (LowMapBuffer[shift]!=

Compiling Errors

Hello guys. I am having a problem compiling this code. When I leave out the closing parenthesis I get only two errors. But when I include it I get 26 errors. Could you please help me by going through it and highlight for me anything that I may have missed? thanks! PS. "Createtline" is a function to