Download MetaTrader 5
To add comments, please log in or register
Create Forum topics and improve your rating!
Mccallum28
253
Mccallum28 2014.05.05 13:14 

Hi everyone,

I am trading using the attached indicator, when a sell signal is triggered I buy, and vice versa. It works strangely enough. I would like to surn this indicator into an EA, would someone be able to help me adjust the code, instead of printing the signal and setting of an alarm I would like it to open an order on the open of the next bar. For example:


Sell signal triggered: OrderSend(Symbol(), OP_BUY, lots * 2, Bid, 3, // at the open of the next bar


Buy signal triggered: OrderSend(Symbol(), OP_BUY, lots * 2, Bid, 3, // at the open of the next bar


if there is a position open it is reversed when the opposing signal is triggered. if no position trade as above. If a position is open and another signal is triggered in the same direction, ignore.


To someone who knows what they are doing I guess it would take then a few min to adjust the code, I have been trying now for days and its driving me crazy. Please can someone help me out. It would be greatly appreciated.

Mccallum28
253
Mccallum28 2014.05.05 14:56  

I have managed to make a start but as I am very new to coding I have problems. Can someone enplane how I can code the above with an option to reverse at alternate signal?


Thanks for your help in advance

Files:
tester.mq4 2 kb
/
To add comments, please log in or register