[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 577
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Good evening dtxth I open a buy order, just buy, in the price it says asc, just asc, and here, it swears like this 2012.02.19 22:31:57 2010.08.02 01:12 EURUSD order,M15: invalid price 1.30616000 for OrderSend function
Is this normal? Can I add normalization to it directly inside the order?
Normalisation can be prescribed right inside the Ordersand.
Good afternoon.
Can you tell me the code to build MA for MACD.
applied_price should be equal to the MACD value.
Good afternoon.
Can you tell me the code to build MA for MACD.
applied_price should be equal to the MACD value.
It won't work...
That's because:
And price constants can take values:
The price used to calculate the indicators can take any of the following values:
So use
double iMAOnArray( double array[], int total, int period, int ma_shift, int ma_method, int shift)
Calculation of Moving Average on data stored in the array. Unlike iMA(...) the iMAOnArray function does not select data based on the instrument name, timeframe and price used - price data must be prepared in advance. The calculation is performed from left to right. To arrange access to the array elements as to time series (i.e., from right to left), use the ArraySetAsSeries function.Normalisation can be prescribed right inside the ordersend.
Thank you!!! I did. Now, I'm sorry, he does not seem to like the lot, he writes like this. 2012.02.20 08:16:41 2010.08.02 01:12 Tester: PrevBalance: 500.00, PrevPL: 0.00, PrevEquity 500.00, PrevMargin: 0.00, NewMargin: 653, FreeMargin: -153.05
This is a demo account. Is lot one a lot, sorry???? And what is the new margin, free margin?
Yes, that's it, a lot at a balance of 1000 walks.
Thank you!!! I did so. Now, I'm sorry, he doesn't seem to like the lot, he writes like this. 2012.02.20 08:16:41 2010.08.02 01:12 Tester: PrevBalance: 500.00, PrevPL: 0.00, PrevEquity 500.00, PrevMargin: 0.00, NewMargin: 653, FreeMargin: -153.05
This is a demo account. Is one lot a lot, sorry???? And what is the new margin, free margin?
Free Margin is a free margin for opening an order with the corresponding (to this margin) volume.
Since " FreeMargin: -153.05 ", no orders will open at all as this value is negative.
See the calculator . For example, you can enter in different values and see how much margin you need for a given size of the position,
To open 1 lot on the Eurobucks we would need $265 of free margin with 1:500 leverage. The point value is equal to $10.
Guys, help... I'm confused.
here's the problem - how to keep the script on the chart :(
Here's an example of a script...It closes all trades if the total value :
nt start()
{
int i;
bool k=1;
//----
while (k==1) {
if ((AccountProfit()>=500) || (AccountProfit()<=-300))
{
for(i=OrdersTotal()-1; i>=0;i--)
{
if(OrderSelect(i,SELECT_BY_POS))
{
if (OrderType() == OP_SELL)
OrderClose( OrderTicket(),OrderLots(), Ask, 20, 0 );
}
}
for(i=OrdersTotal()-1; i>=0;i--)
{
if(OrderSelect(i,SELECT_BY_POS))
{
if (OrderType() == OP_BUY)
OrderClose( OrderTicket(),OrderLots(), Bid, 20, 0 );
}
}
}
k=0;
}
return(0);
}
I want it to hang until the account profit is broken in one of the directions (in this case 500 and -300)
Please advise how to register a condition in the EA, so that when the order is opened, it will open only one order and until this order is not closed at stop or take profit, the other will not open
int ticket, total; //<---забыл указать...сорри
total = OrdersTotal();
if(total < 1){
ticket=OrderSend(...);
}
int total;
total = OrdersTotal();
if(total < 1){
ticket=OrderSend(...);
}
Thank you very much! )