Hello guys, this is my first post here, what motivated me was to spend the fourth overnight in a row trying to translate a PVT (price volume trend) indicator to an EA strategy. When the pvt crosses a moving average up or down.
The indicator I downloaded to be able to get the calculation base was from Metaquotes: https://www.mql5.com/en/code/45 and it goes like this:
And I'm having trouble translating the call from Oncalculate, which has the rates_total and prev_calculated parameters. Because in the EA we cannot call this function.
Hence the idea is to look for a way to translate this code so that the EA runs, and I saw that there is a workaround using iBars for rates_total, which then pulls the number of bars for the period you stipulate. but it was the most I managed to develop =(
I've been programming EAs for 4 months and the learning here is being almost literally based on trial and error, and this is the first time I ask for help here, because I believe that I lack a simple detail that is not yet part of my knowledge. Cheers!
Price and Volume Trend (PVT) indicator, like On Balance Volume (OBV), represents the cumulative sum of trade volumes calculated considering close price changes. The calculation algorithm is close to that of the indicator OBV. But in OBV we add the whole daily volume to the current indicator value when close prices are higher, and detract the...
Hello guys, this is my first post here, what motivated me was to spend the fourth overnight in a row trying to translate a PVT (price volume trend) indicator to an EA strategy. When the pvt crosses a moving average up or down.
The indicator I downloaded to be able to get the calculation base was from Metaquotes: https://www.mql5.com/en/code/45 and it goes like this:
And I'm having trouble translating the call from Oncalculate, which has the rates_total and prev_calculated parameters. Because in the EA we cannot call this function.
Hence the idea is to look for a way to translate this code so that the EA runs, and I saw that there is a workaround using iBars for rates_total, which then pulls the number of bars for the period you stipulate. but it was the most I managed to develop =(
I've been programming EAs for 4 months and the learning here is being almost literally based on trial and error, and this is the first time I ask for help here, because I believe that I lack a simple detail that is not yet part of my knowledge.
Cheers!