Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 6. - page 920
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
Hello
my "start on historical data" button is not active
What could be the reason?
Are the parameters right?
Good time everyone :-)
I have faced this problem. I have a function which puts a pending order. But it places them ONLY if there is no order at the given price. But an order is repeated at the same price in a strange way. Here is the function which places an order.
It outputs the same open prices, but the lineif(PR1==OrderOpenPrice()){chek1=true;} does not want to be executed. Can anyone answer why????
Because I'm getting sick and tired of..... :-( prices are the same and the order still opens.....
Can you please tell me what the problem could be? I tried to attach different indicators, they all work, but only in the Strategy Tester!
Good afternoon everyone!
Can you give me a hint...
Here is a code snippet where there are two conditions when the Print function prints a message.
The problem.
Print function prints the message EACH tick, I need it to print it only on the first tick and on the rest - rested.
Please advise me how to stop it after the first tick.
Thank you.
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY))
if ( OrderType ()==OP_SELL)
X1 = OrderProfit( );
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY))
if ( OrderType ()==OP_SELL)
if(X1 < 0)
Print(" LOW ", X1 );
Good afternoon everyone!
Can you give me a hint...
Here is a code snippet where there are two conditions when the Print function prints a message.
The problem.
Print function prints the message EACH tick, I need it to print it only on the first tick and on the rest - rested.
Please advise me how to stop it after the first tick.
Thank you.
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY))
if ( OrderType ()==OP_SELL)
X1 = OrderProfit( );
if (OrderSelect (Ht-1,SELECT_BY_POS, MODE_HISTORY))
if ( OrderType ()==OP_SELL)
if(X1 < 0)
Print(" LOW ", X1 );
If it is a rachsite once per bar, I use
if (b!=Bars){
b=Bars;
}
So the calculation that is in brackets only happens once per bar...
If we are talking about rachsite once per bar, I use
if (b!=Bars){
b=Bars;
}
So, the calculation that is in brackets only happens once per bar...
Thank you very much.
I need the info to be shown on the first minute bar and only on it.
The version that you propose I tried, ..... but it displays information on 2 and 3 and so on ... because the second bar is not equal to the first and the third is not equal to the second, etc..
I need to print the information once at the first bar. And until the next order is closed by the STOP, thePrint functionshould "rest".
Thank you very much.
I need the info to be displayed on the first and only the first minute bar.
The option you offer I tried, ..... but it displays information on 2 and 3 and so on ... because the second bar is not equal to the first and the third is not equal to the second, etc.
I need to print the information once at the first bar. And thePrint functionshould "rest" until the next order is closed by the STOP.
Try to use a flag.
like
bool flag=false;
......
if (x1<0)&&(flag==false){Print();flag=true;}
Then the print will be printed ONE time.
And after the stop is triggered, reset the flag to false and the print will be executed once more....