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
The code posted is for closing order, not to open. So you can post the relevant code if you need help.
Thanks angevoyageur.. Here is the code for opening a Buy order... all other code for opening a trade is identical except for the " Buy order ", just substitute OpenBuyLimitOrder, or OpenSellLimitOrder, or Open SellStopOrder etc, in the appropriate spot.
Thanks angevoyageur.. Here is the code for opening a Buy order... all other code for opening a trade is identical except for the " Buy order ", just substitute OpenBuyLimitOrder, or OpenSellLimitOrder, or Open SellStopOrder etc, in the appropriate spot.
I guess you don't have anything printed in the log ? so we can suppose this code is not executed if you don't get trades.
The relevant code would be where you are calling this OpenBuyOder (or similar function).
I guess you don't have anything printed in the log ? so we can suppose this code is not executed if you don't get trades.
The relevant code would be where you are calling this OpenBuyOder (or similar function).
That is correct, there is nothing printed in the log other then it saying the EA loaded successfully...
That is correct, there is nothing printed in the log other then it saying the EA loaded successfully...
Code for calling a buy order...
Code for calling a buy order...
It seems your OpenBuyOrder() isn't call at all, so to understand you need to check to code before this call. Don't you have some conditions (if statement) to check if you want to send a buy order ?
This would be the code from the beginning of the Start function with the If() conditions for a buy trade...
Nothing to do with your problem, but you do realise that you give NewBar and BarShift values, but then do nothing with them?
Please don't post code like this, use enumerations such as MODE_SMA etc
What is the point of an MA with period of 1?
Just use Open[0]
Where is the function BuyMarketCount?
You don't show it.
Incidently, the 2nd line is conditional on the first if being true. You have already checked BuyMarketCount(Symbol(),MagicNumber) == 0, so no need to check again
I've just realised