Pending MA Buy limit & Sell Limit Script

 

Can anybody help me create a Buy Limit/Sell Limit script based on MA and using a hotkey? Such that when price (candle) close above the MA, I will press the hotkey and a pending order (buy limit) is triggered on the MA price. Also, when price (candle) close below the MA and I press the hotkey a pending order (sell limit) is triggered on the MA price. This will save us the trouble of manually setting those pending orders(buy limit/sell limit) on the MA price level. Thank you for your help!

 

You can add an alert (wav file) such that when trade is triggered on the pending order, a sound alert will also trigger. Thank you.

 

Please help somebody....I need this script urgently. mrtools, mladen and where is newdigital? I hope he is alive and well? Somebody please help me out. Thank you.

 
romotly007:
Please help somebody....I need this script urgently. mrtools, mladen and where is newdigital? I hope he is alive and well? Somebody please help me out. Thank you.

Did you see here: https://www.mql5.com/en/forum/general ?

 
mrtools:
Did you see here: https://www.mql5.com/en/forum/general ?

I have posted a reply. Its a new script that is different from the others because of the MA(Moving Average) in it and I know you can do it. Thanks alot.

 

This script will set either a Pending BUYLIMIT or SELLLIMIT depending on where the MA is relative to the Price position.

Set the Hotkey then set your inputs in the input window and click OK or simply double click the script then set your inputs. Either way it is going to be more than a single click operation, hotkey / inputs / OK or double click script / inputs / OK.

pending_set__ma.ex4

Files:
 
cja:
This script will set either a Pending BUYLIMIT or SELLLIMIT depending on where the MA is relative to the Price position.

Set the Hotkey then set your inputs in the input window and click OK or simply double click the script then set your inputs. Either way it is going to be more than a single click operation, hotkey / inputs / OK or double click script / inputs / OK.

pending_set__ma.ex4

Thank you very much cja. Could you please upload the original mql4 script so that a can permanently set the lot size, TP & SL, and MA on the metaeditor? Thank you.

 

Hello cja, are you there? Please post the mql4 script so that I could edit the settings once and for all and not have to edit every time I run the the script. Thank you.

 
romotly007:
Hello cja, are you there? Please post the mql4 script so that I could edit the settings once and for all and not have to edit every time I run the the script. Thank you.

I am not prepared to post the mq4 file however I have made an input indicator for the inputs of the script.

NOTE : Very important !!

1/ You must open the "inputs" indicator in the MetaEditor set your desired inputs and then compile the indicator, this will set the inputs for the "Pending set @ MA v1" script.

2/ It is not necessary to load the "inputs" indicator onto a chart just compile it and leave it in your indicator folder list.

3/ The "Pending set @ MA v1" script will now load onto the chart with those input settings that were set in the "inputs" indicator.

4/ I have removed the "show inputs" code in the script so now it loads without the input window appearing before loading the script on the chart, you should be able to double click the script or use the hotkeys for an instant load.

5/ Do not change the name of the "inputs" indicator as the script will not recognize the inputs if you do.

pending_set__ma_v1.ex4

inputs.mq4

Files:
 

Thank you very much cja, I will follow the instruction to the letter. Thanks once again.

 

There is a problem cja, I wanted to run the script on 2 different MAs I use for trading by putting two inputs.mql4 in the indicator folder with different settings as well as having two Pending set @MA v1.ex4 in the script folder. I could only execute one settings successfully. What do I do?

Reason: