[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 41

 
Shniperson:
No. It says "Error opening sell position: 133 (or bay position)

Once again:

Error 133: Trading prohibited. All trading attempts must be stopped.

That's why there is an error when you open

 

Help me find a function that determines on different timeframes, which candle was last bullish or bearish?

I wanted to ask another question, but I can't figure it out. The matter is that I need only one order to be opened at a time on one pair.

In other words, I have sold and until a stop loss or profit goes off or I close it, I do not open other orders.

 
ilunga:

Once again:

Error 133: Trading prohibited. All trading attempts must be stopped.

hence the opening error


Um... so trading EAs is banned? Or could it be the robot itself?
 
Shniperson, when you place an EA, do you check the box to allow trading?
 
Roman.:

Roman, have you understood the indicator? From the image, you can see that there were 5612 shares, the initial balance was 10000 and the loss was 239. This indicator also shows the balance graph.

Does it work the way you want it to?

Maybe the start balance was not 10000 the day before and therefore it shows the equity?

 

I have redesigned the indicator a bit. Now, if day=0, it will show the history for all available days.

Files:
 
forexnew:

Roman, have you figured out the indicator? From the image, you can see that there were 5612 shares, the initial balance was 10000 and the loss was 239. This indicator also displays the balance graph.

Does it work the way you want it to?

Maybe the start balance was not 10000 the day before and therefore it shows the equity?


Thank you for your work, but it's not about additions and profits/losses on the account as a result of closed (open(floating profit/loss)) positions, but about control over amounts of I/O (external input) on a given trading account at a particular time of the terminal. In general, ideally - something like Boolean's f-fi is necessary (I will write it myself - it is enough to describe how it is possible (if at all possible) - in external parameters we set designation hour (by European standard time), for example 16 h 00 min. - Run the function for execution at this time - as a result of its execution, it changing the value of a global variable (which takes the value of a specific amount of funds deposited/withdrawn during these days (say, from 00h 00m), itself takes value "Yes" or "No", ie, whether there was a deposit/withdrawal of funds from the trading account and if was, how much. It goes like this.
 
Roman.:

Thank you for your work, but we are not talking about additions and profits/losses on the account as a result of closed (open(floating profit/loss)) positions, but about controlling amounts of I/O (external input) on a given trading account at a particular time of the terminal. In general, ideally - something like Boolean's f-fi is necessary (I will write it myself - it is enough to describe how it is possible (if at all possible) - in external parameters we set an hour of calculation (by Central European time), for example 16 h 00 min. - Run the function for execution at this time - as a result of its execution, it changing the value of a global variable (which takes the value of a specific amount of funds deposited/withdrawn during these days (say, from 00h 00m), itself takes value "Yes" or "No", ie, whether there was a deposit/withdrawal of funds from the trading account and if was, how much. It goes like this.

This indicator exactly shows the amount of deposit (for example, +500) or withdrawal (-500) for the last day (top-up/withdrawal). You only need to automate the calculation of the balance which was a day ago, if you want to make it fully automatic, i.e. instead of entering the StartBalance manually - the calculation of the balance is a day ago (for example).

if(TimeHour(prevtime)==0 && TimeMinute(prevtime)==1)
{
StartBalance=AccountBalance();
}

prevtime=TimeCurrent();

StartBalance will be equal to balance for 0 hours. Put it in the indicator and everything should work, if I understand you correctly of course.

 
forexnew:
This indicator just shows the amount of input (e.g. +500) or withdrawal (-500) for the last day (top-up/withdrawal). You only need to automate the determination of the balance amount from the day before, if you want to do this fully automatically, i.e. instead of entering the StartBalance manually - calculating the balance from the day before (for example).

Thank you very much - I will deal with the indicator after work.
 
forexnew:

This indicator just shows the amount of input (e.g. +500) or withdrawal (-500) for the last day (top-up/withdrawal). You only need to automate the calculation of the balance which was a day ago, if you want to make it fully automatic, i.e. instead of manually entering the StartBalance - the calculation of the balance is a day ago (for example).

if(TimeHour(prevtime)==0 && TimeMinute(prevtime)==1)
{
StartBalance=AccountBalance();
}

prevtime=TimeCurrent();

StartBalance will be equal to balance for 0 hours. Put it in the indicator and everything should work, if I understand you correctly of course.



Sorry - I haven't looked at the code yet - is it iCustm () - is it amenable?

Yes, you have understood correctly.

Reason: