Saving results to file.
-
Does anyone have an example?
I want my EA to save the data of that trade in a line inside a .csv file for each open trade
When this trade is closed I want my EA on this same line to give the result if it was a winning or losing trade.I will cite an example:
EA with average crossing and Fibonnaci-based target.
Purchase entry performed, saving data:
Buy,Stoploss=200points,TakeProfit=600points,Result=Positive
Sell,StopLoss=100points,TakeProfit=400points,Result=Negative
Sell,StopLoss=300points,TakeProfit=500points,Result=PositiveBut this would have to work in the backtest as well.
It's possible? If so, could someone give examples with projects? -
@ontradingx I have never used but you do have the write to file block, if set on append then every new entry will go on a new line, so I imagine if all required data is sent at the same time it will be on the same line. Hope this helps

-
You can also explore the possibility of downloading the history that delivers the information by line.
-
@rodrigo-ortuzar That's what I'm trying to do right now.
I hope it works, I want to analyze a series of information from my EA inputs and implement a search for better parameters as if it were a neural network but through an excel spreadsheet. -
The biggest problem now is that it doesn't work in backtest.
I wanted to do a backtest of my EA and during the backtest it kept storing the information, but it didn't work.
Does anyone have any ideas? -
@ontradingx I managed to do this, thank you all so much I was wrong the folder it creates the .csv file
@jstap @Rodrigo-Ortuzar -
@ontradingx Your welcome