Hello MQL5 community,
I generate a trading signal from an external application and I would like to use these signals as input for me EA. There can be no more than one signal per single day.
As soon as the external application generate a signal a new line is added at the end of the file containing all the information needed to open a position.
The CSV file to which informations are recorder looks like this :
As you can see there is date, a currency pair, the type of position (i.e. 1 for long and -1 for short) and the limited price.
My first objective is to backtest this strategy in Metatrader, so I would like a condition that would say :
This condition should works with historical data (backtesting) and live trade.
With the code bellow I'm able to read the different values in the file but I'm not so familiar with MQL langage and can't figure out how to handle CSV in an elegant manner to perform such verification.
Should I put all dates present in the csv into an array ? or is there a possibility to loop through them once a day with, for example :
Thank you,
1.The signal for trading no more that one signal per day would have to be a function that checks the deal history.
2.What are the CSV file properties.
3. Should I put all dates present in the csv into an array ? , If there is ever a question that you should then do it. You never know in the future if you are going to need it.
Its better have it and not need it than need it and not have it.
4. possibility to loop through them once a day. Yes you can loop through them. there are examples in the code base also if you need help there are other programming languages that offer the capabilities just rewrite the code in C++ and rewrite some values for MQL.
Hello,
I've create a job service for this task.
https://www.mql5.com/en/job/24761
- www.mql5.com
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello MQL5 community,
I generate a trading signal from an external application and I would like to use these signals as input for me EA. There can be no more than one signal per single day.
As soon as the external application generate a signal a new line is added at the end of the file containing all the information needed to open a position.
The CSV file to which informations are recorder looks like this :
As you can see there is date, a currency pair, the type of position (i.e. 1 for long and -1 for short) and the limited price.
My first objective is to backtest this strategy in Metatrader, so I would like a condition that would say :
This condition should works with historical data (backtesting) and live trade.
With the code bellow I'm able to read the different values in the file but I'm not so familiar with MQL langage and can't figure out how to handle CSV in an elegant manner to perform such verification.
Should I put all dates present in the csv into an array ? or is there a possibility to loop through them once a day with, for example :
Thank you,