How do you usually exeute trades calculated by Position Size Calculator?

  • Manually

    Votes: 12 15.2%
  • PSC-Trader script with a mouse click

    Votes: 13 16.5%
  • PSC-Trader with a keyboard shortcut

    Votes: 51 64.6%
  • Using third-party trading panel

    Votes: 2 2.5%
  • Other (please provide details)

    Votes: 1 1.3%

  • Total voters
    79
  • Poll closed .
Status
Not open for further replies.

Chistabo

Active Trader
Apr 13, 2015
16
1
29
Slovenia
There is already a script to trade using this indicator. I do not want to code an EA based on it, because EAs have one big restriction: there can be only one on one chart.
Makes sense. Nevertheless, I have put this indic and script into EA, with 4 buttons (Trade, Pending/Instant toggle, Show/Hide lines, TakeProfit line show/hide)

No idea how to do that without DLLs.
F7 will do, I have found latter it will pop-up Inputs window.

I don't get it. Could you please show a screenshot?
Ignore please. This refers to my version.

Yes if you set DeleteLines to true.
Yea, makes sense. Didn't thought about 'Initialization()' function.

No idea how to do that without DLLs.
I had to completely re-code to make button work, but that involved changing Indic into EA.

How would it work? Cutting the extra decimal places? That's not a good idea when dealing with the trade levels...
Well, as I see it, this custom function only re-formats the number into American standard. Never mind, I still love it.

Thank you for sharing, I didn't mean to bother you that much, I have not expected your answer.

I can share EA version, if Enivid agrees to post it here (it is renamed). Otherwise, anybody interested can contact me.

Viva'l Enivid,

Best regards,

Simon
S love nia

* A Script configuration window. Where the 'About', 'Common', 'Input' and other tabs are found. A place for input parameters to be set, like the amount of tolerated slippage (without going into the code). And without this UI, double left-clicking on the script from the navigator window actually enters a new trade if a PSC is attached to the chart you're currently looking at. I find this could trigger unwanted trades to be entered by accident.
If you put '#property show_inputs' at the top of the script's code, I think this will do what you want - pop-up 'Inputs' window of script, when it is launched. I do not even use 'Slippage', I believe it is for scalping?

* A throttle mechanism. A safeguard to protect people from accidentally entering multiple instances of the same trade. This could potentially happen in a lot of ways, mainly by the user accidentally double tapping their hot key and similar things of this nature. Maybe an optional input parameter to set the number of seconds that have to pass between new trade entries?.
Little less coffee should do, if you are too fast on mouse button or hotkeys. Just kidding, LOL.

Best regards,

Simon
S love nia
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
@Enivid

Ah I see, I didn't realise that was the case.

Now that has been explained to me, I can see why it has been created the way it has.
(And rightly so)

Thank you.
 
Last edited:

Chistabo

Active Trader
Apr 13, 2015
16
1
29
Slovenia
You can attach it to your post by clicking Manage Attachments button when creating a new post.
Yes, I know how to attach a file, the question was 'if Enivid agrees'. Your answer can be taken as yes.

Attached is folder with EA.
Since, I had to modify original files from Enivid, I did renamed them. No hard feelings, please. Thank you.

Buttons (from top):
[Trade] - will place trade as per button settings/lines
[Pending] (default) - will toggle pending/instant entry type
[Hide Ln] - will toggle hide/show entry/stopLoss/takeProfit lines on chart
[TP Ln] - will toggle hide/show takeProfit line, which auto-magicaly appears at correct side of entry line, and suplemented info

The code is not fully optimized. Use at your own risk.
Chi EA goes into 'Experts' folder, other 2 into 'Include' folder.

Best regards,

Simon
S love nia
 

Attachments

  • Chi EA (from PSC).zip
    16 KB · Views: 28

Chistabo

Active Trader
Apr 13, 2015
16
1
29
Slovenia
Hi!

Enivid, I just disabled 'Allow DLL', and it works just the same.
Why is 'Allow DLL' bad? Just curious.

Best regards,

Simon
S love nia
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Hi!

Enivid, I just disabled 'Allow DLL', and it works just the same.
Why is 'Allow DLL' bad? Just curious.

Best regards,

Simon
S love nia
The EA loads a DLL, but does not use it, so it can work with out it. I just did not realize that there is an OBJ_BUTTON chart object in MT4 that can work without DLLs. Now I see it.

EAs and Indicators with DLLs are not necessarily bad, but they reduce the trader's security. A trader needs to have ultimate trust in the script author's good will because anything can be done via DLL - from information leakage to total control over the trading account and/or the whole PC.
 

Chistabo

Active Trader
Apr 13, 2015
16
1
29
Slovenia
EAs and Indicators with DLLs are not necessarily bad, but they reduce the trader's security. A trader needs to have ultimate trust in the script author's good will because anything can be done via DLL - from information leakage to total control over the trading account and/or the whole PC.

Agreed, that is why I posted all relevant (#include) files.
I have upgraded Chi EA - it now remembers settings for Show/Hide line, so when timeframe is changed or EA removed/put back on chart, it stores/reads GlobalVariable values and acts accordingly.
Will probably also add GlobalVariable for Entry/StopLoss/TakeProfit line price value, so lines will stay where they are when TF is changed or EA removed.
If anybody interested, let me know, and I will post the code.

Best regards (and pips),

Simon
S love nia
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
Hello Enivid, I hope all is well.

The indicator and script combination is working fantastically well. Nice work.

I will now explain a new idea that I think may be a good addition to the indicator and quite useful whilst the user is setting up a new potential trade entry.

Technical Stop-Loss/Risk distance. Basically, a simple optional addition that calculates and displays the difference between the Stop-Loss price and the Entry price and is shown in a new object line under these two values.

In the attached screen shot there is an example of a new potential trade entry. If I was going to put on this or any other trade for real I would have to bring up the MT4 cross-hairs and then have to see and eventually approve the distance between my potential Entry and Stop-Loss levels to see if it is a nice compact and viable trade that could realistically yield a high risk to reward.

For example the distance in that picture is 229, So for this trade to be able to achieve a 1:4 R:R it would have to travel 916 in my favour. Knowing how much a particular market moves on average and how long it may take to move that far, I then decide if that is an acceptable trade that I wish to enter or not. Maybe then I move my stop-loss closer for a more tighter and more compact entry. Or I may even skip the trade altogether if the risk distance is that large that the trade may only realistically yield a mere 1:1 or 1:2 R:R ratio. Visually working out a rough distance value without the cross-hairs is quite difficult due to MT4 constantly compressing and decompressing the candlesticks.

You will also find that the risk distance is officially displayed by MT4 AFTER the trade has been entered, and the information is found by hovering over the stop-loss trade level on the chart. I think it would be good to know beforehand while the trade is being set-up and it will save time by not having to always calculate the distance by using the cross-hairs or performing calculations on the entry and stop-loss prices manually.

Thank you.
 

Attachments

  • AUDUSDH4.jpg
    AUDUSDH4.jpg
    72.8 KB · Views: 41
Last edited:

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Please look at the Spread Betting Calculator's display. Is it what you are talking about (pips distance)?

Although I strongly disagree with your method of using it (setting desired R:R ratio rather than calculating it from the technical levels), I do agree that seeing a distance to SL ro TP in points could be useful. The problem is that it is hard to decide the size of the pip to use in such a display while adding more input parameters to control that (see Spread) could lead to a lot of confusion. PSC is already overloaded with input parameters. Do you have some ideas to work around that?
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
No.

Never mind, forget it, thank you anyway.

It was just a suggestion but most importantly the indicator and script both work great and that is what matters.

Developers develop. Traders trade. Lets keep it that way.
 
Last edited:

huangjin

Active Trader
May 19, 2015
11
1
27
hi Enivid and all ,first thank you for the wonderful indicator, what a great job you done .i use the indi and it work well for me ,i have a few small modified for myself ,there is two little thing i would like to see if you can change it for me . 1 if you can change the text layout in the window to two column like in the attachment , 2 if you can set the take profit line so many pip (say 150)away from the price by default, because on a chart ,it is easy to drags the take profit line to the position rather then look for the exact number to put in .thank for your time .
 

Attachments

  • 20150519230357.png
    20150519230357.png
    11 KB · Views: 28
  • 20150519233249.png
    20150519233249.png
    21.9 KB · Views: 26

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
Thanks for suggestions. Here are my thoughts:
1. It is possible, and I will look into how to do it soon.
2. TP is not necessary for PS calculation, so it won't be a default behavior. I will consider adding a button that would place/remove the TP on a click.
 

Enivid

Administrator
Staff member
Nov 30, 2008
19,301
1,529
144
Odesa
www.earnforex.com
1 if you can change the text layout in the window to two column like in the attachment

I have make a temporary fixed version for your suggestion. You can download it via attachment.
 

Attachments

  • PositionSizeCalculator_Base_hor.mqh
    35.4 KB · Views: 19
  • PositionSizeCalculator_Main_hor.mq4
    4.3 KB · Views: 22

huangjin

Active Trader
May 19, 2015
11
1
27
Thanks for suggestions. Here are my thoughts: .....
adding a button that would place/remove the TP on a click.

it would be great ,if the TP line be a distance from the EntryLine that is easy to see (find) in the charts.

many thanks for your work.
 

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
Good day Enivid,

On the whole everything is going fantastically well, but I would like to bring something to your attention. I'm not sure if it's a bug or if it's intended but if you take a look at my attached screen shots you can see that when the three main market prices (The BID, the ASK and my Stop-Loss) become quite near to each other, a 4th price line level all of a sudden appears. This happens every time these 3 prices are close to each other and I'm not sure if or how it would effect the PSC Script.

I'm running MT4 Build 840 with your PSC Main v1.22, PSC Script v1.00 and Spread v1.03.
I have not altered any of the PSC Indicator or Script code, but I did add some more spaces to the Spread Indicator text so it would visually align with the PSC.

My charts are black and white themed with the Ask line showing.
The 2 attached screen shots are not the best nor do they show the most realistic of situations but they do provide a visual aide to accompany my description of said situation.

Thank You.
 
Last edited:

Andy

Master Trader
Nov 28, 2014
130
13
54
London UK
I don't, I just know one moment everything is fine with 3 price levels showing (My Stop-Loss, the Ask price and the Bid price, of course my entry would be one of these 2 prices depending on where my Stop-Loss is placed and if I was going long or short), then once they get close a fourth price line appears?.

I always use Instant Execution.
 
Last edited:
Status
Not open for further replies.