An advisor that would follow the rate on a five-minute chart with conditions after launch: - page 5
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
What's wrong?
Function OrderSend( string symbol, int cmd, double volume, double price, int slippage, double stoploss, double takeprofit, string comment=NULL, int magic=0, datetime expiration=0, color arrow_color=CLR_NONE)
Parameters: symbol - Name of the financial instrument being traded.
cmd - The trade operation. Can be any of the trading operation values.
volume - Number of lots.
price - Opening price. slippage - Maximum allowed price deviation for market orders (Buy or Sell orders).
Stoploss - The price to close a position when the loss is reached (0 if there is no loss).
Takeprofit - The price to close a position when the profitability level is reached (0 if there is no profitability level).
comment - Order comment text. The last part of the comment can be changed by the trading server.
magic - The magic number of the order. Can be used as a user-defined identifier.
expiration - Expiration time of the pending order.
arrow_color - Color of the opening arrow on the chart. If the parameter is missing or its value is CLR_NONE, the opening arrow is not shown on the chart.
Where do you have it? - You have some fragment instead of OrderSend
And what is the result of the Ask*Point calculation here:
???Here is full code:
For a quick test I set Delta=2
extern int Delta=2;
Maybe you can implement this to understand the errors:
It's not working for me for some reason......
Here is the full code:
Actually OrderSend for buying and for selling are written slightly differently. Because we buy at Ask price and sell at Bid price ! And closing by stops as well... With you - all at the same price ...
In addition, lot=1 is intended to work here. Does your deposit correspond to this size? And what does the log say - why isn't it working?
You do not know the difference between Bid and Ask, you do not understand the difference between a short position and a long position. You have no idea what a Stop Loss and Take Profit is. You do not understand what you have already written. You are trying to code by gut feeling. Who can help you???? Learn the basics. All questions have been answered. I don't see the point in quoting a textbook.
It's not working for me for some reason......
For a quick test I set Delta=2
extern int Delta=2;
What for? Do you know how to use a tester?
I knew a guy once. He'd been trading forex for a year and he still thought a long position was one that stayed in the market for a long time. And a short position is one that's, like, a pipsqueak position.
What do you think?