[Archive!] Any rookie question, so as not to clutter up the forum. Professionals, don't pass it by. Couldn't go anywhere without you - 2. - page 467

 
Maximonis:

Good day! Help please. I need a script that automatically sets the stop and profit when I do manual trading. Do you think this is possible and if it exists, give me a link.


I personally do not have such a script.

Look it up in CodeBase. I'm sure you will find it.

I myself use scripts which immediately open Buy or Sell on hotkeys with specified stops and lots.

If you need it I can attach it to the message.

 
Maximonis:

Good day! Please help. I need a script that automatically sets stop and profit during manual trading. Do you think it's possible and if it exists, give me a link.
You don't need a script, you need an Expert Advisor. It should be a very simple one.
 
Thank you all gentlemen. I'll try again tonight with the logs if anything.
 
extralifes:
Thank you all gentlemen. I will try again tonight with the logs if anything.

I've already answered that. You don't need logs from the log, you need this:

As long as the MACDac condition is met, there will be packs open and orders on every tick.

Add to the conditions
for Buy positions: If there is NO market Buy order, then open it...
For Sell positions: If there is NO market Sell order, open it...

And the problem will be solved.
 
rlx:


I personally do not have such a script.

Look it up in CodeBase. I'm sure you will find it.

I myself use scripts which immediately open Buy or Sell on hotkeys with specified stops and lots.

If you need, I can attach it to the message.


Hotkeys are even better than the terminal button, the main thing is that stop and profit values can be changed, attach it please, I will use it
 
artmedia70:
You don't need a script, you need an advisor. And a simple one at that...


Where can I get one of those? Or how much does it cost to write one?

 
Maximonis:

If you would like to use hotkeys, it's even better than the terminal button, the main thing that the stop and profit values can be changed.


In archive

Put it in the experts/scripts/ folder

close.mp4 Close the first order of this symbol

closeAll.mp4 Close all orders for this symbol

Trade_BUY.mp4 Open Buy

Trade_SELL.mp4 Opening of Sell

The below described files are necessary to decrypt the error in Russian in case of the opening error. If these files are available, they do not need to be added.

You put them in the experts/libraries/ folder

stdlib.mq4

Put it in the experts/include/ folder

stdlib.mqh

All these files, after they have been moved, need to be opened in MetaTrader and compiled.

Then the Trade_BUY and other scripts will appear in the client terminal.

Press set hotkey and go ahead.

If you have a 5-digit broker, you need to tweak the scripts yourself. Because I "fine-tuned" them for myself.

 

Stops and Profits and lot size can be set via Global Variables.

You can create them yourself. Or they may be created at first trade with default values

gv_LotSize - Default lot size 0.01

gv_StopLoss - 20 points by default (4 digits)

gv_TakeProfit - 30 pips by default

 

The archive doesn't seem to stick. Probably because it's a Rar

Here's the ZIP archive.

Files:
scripts.zip  9 kb
 
rlx:

Approximately as follows

The number of lots must not exceed lotsShortNaVSE

SL ---- is a possible loss on your open position.

And brokerage companies have their own view of the possible loss.

That is why we need to take the Maximal number from your or from the brokerage company. For example, at the moment the Dealer Center for the EURUSD pair has a possible loss SL = 26.

Are there any other options?

Thanks for the reply! I'm going to try it now. Not everything popped into my head on the fly