[ARCHIVE] Any rookie question, so as not to clutter up the forum. Professionals, don't pass by. Nowhere without you - 3. - page 282
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
Please help a beginner. How to write this code section:
Check market orders and if there are no market orders for our financial instrument, we buy it?
And we also need a code line that rearranges the Trailing Stop 500 pips away from the real price.
Help!!!
And what is the distance (from where and to where exactly)?
Well, this is just nonsense! If there is any order: either pending or market, and at that for any financial instrument, no order will open in this code:
We can see that if there is less than one order, it will be executed. Or am I wrong?
From the moving average, take CalculateCurrentOrders(Symbol()), it returns values = number of open orders, filtered by symbol and magic, with sign = direction of transaction: for example -1 means 1 order in sale. If needed, use MathAbs() to ignore the sign.
From the above code, take the trailing stop:
// check for trailing stop - here, there are even comments.
if(TrailingStop>0) { ... }, it is in 2 places - for buying and selling. Everything is simple. Or, you can use ready-made functions of Igor Kim's. There is a special colour here. They are more universal and correct for real trading, but also a little more difficult to understand for a beginner. If you have a good faith in the new version, it will help you find the right one.
p.s. For debugging, use Print(), it helps a lot.
Started to understand your code. I'm surprised. What you have attached cannot work. I can see that it is assembled from the pieces, but at least brackets should be correctly placed, variables should be defined. And the signal - it is unclear, what means, for example, "rsi>30" - indicator RSI value, or something else? The Trade_BUY() function is attached inside the function start... etc.
Either give me complete code which worked (opened orders) or fill out TOR for signals, trailing, etc. It will be easier for me to write from scratch.
Do you have detailed instructions on how to download quotes for MICEX for 2 years, for example for Lukoil.
how to further convert them correctly and open them in mt4, if there are links give links how to do this.
P.S. Thanks in advance.
Here's a mamba for a few years
Please help a beginner. How to write the following code section:
Check market orders and if there are no market orders for our financial instrument, we buy it?
And we also need a code line that rearranges the Trailing Stop 500 pips away from the real price.
Help!!!
And what is the distance (from where and to where exactly)?
Well, this is just nonsense! If there is any order: either pending or market, and at that for any financial instrument, no order will open in this code:
We can see that if there is less than one order, it will be executed. Or am I wrong?
Or maybe you are wrong?
for (int i = 0; i < OrdersTotal(); i++)
{
OrderSelect(i,SELECT_BY_POS, MODE_TRADES);
if (OrderSymbol() == . pair)
{
if(OrderType() == OP_BUY || OrderType() == OP_SELL)
{
OrderSend(Symbol(),OP_BUY, .......
}
}
}
I need some help:
a regular Moving Average indicator when the line breaks down the Buy(up) or Sell(down) signal appears,
Does anyone have a finished code of the graphical object, can you post it!
Thank you.
These are in the database.
Hello! Can you tell me how to "loop" the up/down bar check? That is, how can I describe this condition "shorter"?
Close[0]>Open[0]&& Close[1]>Open[1]&& Close[2]>Open[2]&& Close[3]>Open[3]&&& Close[4]>Open[4]&& Close[5]>Open[5]&& Close[6]>Open[6]&& Close[7]>Open[7]
Thanks in advance.