[ARCHIVE!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Can't go anywhere without you - 4. - page 569

 
Roman.:

I've already told you that - no way! Only by instrument history, you open three charts of the tested instrument on H1, H4 and dailies, charge the used indicators to each of them, then in the tester on H1 you start an expo for testing, using the readings of these indicators from different timeframes(like in the tutorial with M15 and H1), further on, when entering the market, placing certain orders, you stop the test by pausing and memorise the TIME of entering/leaving the market, and then consistently switching over to the previously set tabs of the THIS tested instrument, you rewind to corresponding historical period equal to the period of suspension (pause) in the tester and check the signals from the indicators at different timeframes, switching to a chart with H1, H4 and a day chart, checking the correctness of the expa in the Strategy Tester on the triggering of trading criteria! That's all. There is no other way!


Thank you Roman!

That's how I did it, I hoped there was a way to make it easier and simpler))

Thanks

 

How can I fix it?

When I turn off "Auto Scroll" in the terminal, after pressing the left or right buttons on the keyboard, the chart shifts by three bars.

Is there any way to shift by one bar?

 
ametist444:

How can I fix it?

When I turn off "Auto Scroll" in the terminal, after pressing the left or right buttons on the keyboard, the chart shifts by three bars.

Is there any way to shift by one bar?


To shift to the left - F12, to shift to the right - do not know.
 
rigonich:


You can predict them, but it is impossible to say for sure if they will be there or not, until they appear there, because a zero bar is the last open bar at the moment, and whether the forecast will be correct or not depends on many factors. By the way just using the trend line in the case when the zero bar is the last bar on Friday is exactly the wrong number of bars between points.

P.S.and try to tell the developers that you know exactly how many minute bars will be formed, for example, from the current moment in a day or even an hour.

Where the hell are you going? Then only "coffee grounds" will help...
 
TarasBY:
e-where are you going... Then only "coffee grounds" will help...


That's sick.
 

Please advise.

In my EA, the exit calculation is based on accumulated profit. For example, if at some point in time equity=balance, then the EA will close all trades when the current equity exceeds this very initial one. It will close all trades no matter how many of them there are.

It is simple in the tester, as there is one currency pair.

However, trading is realistically effected with several currencies and each one has to be considered separately. For example: If there are no open trades on some currency pair, then the variable==0. And we should trace closed trades at this symbol as well and wait until the accumulated profit exceeds the loss of open orders of this symbol by the specified value.

I cannot find in the tutorial a function that may be used to separate the accounting of accumulated profits for different currencies. Please advise. Thank you.

 
xant:

Please advise.

In my EA, the exit calculation is based on accumulated profit. For example, if at some point in time equity=balance, then the EA will close all trades when the current equity exceeds this very initial one. It will close all trades no matter how many of them there are.

It is simple in the tester, as there is one currency pair.

However, trading is realistically effected with several currencies and each one has to be considered separately. For example: If there are no open trades on some currency pair, then the variable==0. And we should trace closed trades at this symbol as well and wait until the accumulated profit exceeds the loss from open orders of this symbol by the specified value.

I cannot find in the tutorial a function that may be used to separate the accounting of accumulated profits for different currencies. Please advise. Thank you.


I have to organize my account. The functionsAccountEquity() andAccountBalance() only calculate total profit for one currency pair and not balance and equity but total profit for all orders of this pair.

In general, balance protection which closes all deals and disconnects the Expert Advisor in case of too large drawdown is used as an advice.

 

/// You have to organise your accounting. The functions AccountEquity()and AccountBalance() only consider the total.

So, this is what we are talking about - how to organize?

I don't want to write it in a file, because I want my Expert Advisor to run from different terminals. I want it to count only that currency pair on which it is standing. How should I calculate the profit/loss of the closed orders after the loop initialization?

The cycle starts at the first entry and it already starts to move away from zero to the profit or loss. At each close of an order of this pair, we should add the result of the closed order to the buffer. As soon as the value of the buffer + profit on open positions becomes larger than the specified value - there will be a command to close all trades.

The algorithm is clear to me. I do not know how to take it into account. I am a beginner)

 
xant:

/// You have to organise your accounting. The functions AccountEquity()and AccountBalance() only consider the total.

So, this is what we are talking about - how to organize?

I don't want to write it in a file, because I want my Expert Advisor to run from different terminals. I want it to count only that currency pair on which it is standing. How should I calculate the profit/loss of the closed orders after the loop initialization?

The cycle starts at the first entry and it already starts to move away from zero to the profit or loss. At each close of an order of this pair, we should add the result of the closed order to the buffer. As soon as the value of the buffer + profit on open positions becomes larger than the specified value - there will be a command to close all trades.

The algorithm is clear to me. I do not know how to take it into account. I am a beginner)


Function
OrderProfit()
And why put it in a file? just a variable.
 

rigonich,

to be precise (OrderProfit()+OrderCommission()+OrderSwap()

So, how do I take information from closed orders?

I select orders using OrderSelect() and MODE_HISTORY from the closed ones, but how can I select the necessary ones?

If I can take from the history those that closed after my condition, then of course I will take and summarise what I need. But I don't understand how to do that, unfortunately.

Reason: