EarnForex / PositionSizer

Calculate your position size based on the risk and account size and execute your trades with this free MetaTrader expert advisor.

Home Page:https://www.earnforex.com/metatrader-expert-advisors/Position-Sizer/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Enhancement automatic trading book

walgram opened this issue · comments

Hello. Sorry for my bad entglish, i hope it's understandable for you.

I had the idea to write the content of the message to a csv file, to have something like a trading documentation, example here:

Commentary,DateTime,Period,Symbol,Order,Size,Risk,Entry,SL,TP
....
1653532768,2022.05.26 02:39,16388,XAUUSD,Buy Stop,0.06,87.38,1874.21,1858.64,1905.35
1653571168,2022.05.26 13:19,16388,EURUSDc,Buy Stop,0.14,93.71,1.07833,1.07116,1.09266
1653571705,2022.05.26 13:28,16388,EURUSDc,Buy Stop,0.7,467.00,1.08194,1.07477,1.09627
....

that works fine.
Now want to hide the dialog of the PositionSizeCalculator per code in script.
So that it is not visible when using ChartScreenShot.
Is that possible?
regards Eduard

Hello!

Are you suggesting to add a file logging function to the script or are you suggesting adding an option to disable the usual logging messages of the script?

Hello.
I think it is better to attach my code here. You can find my changes easily by searching for "update ewal" .
I want to make a ChartScreenshot where Commentary is part of the filename. The dialog from PositionSizeCalculator should not be visible in the screenshot.
So i see two possibilities:
Hide the dialog before ChartScreenshot per code in the script or send the filename from the script to the indicator.

PositionSizeCalculator_ewal.zip

"The dialog" - you mean the entire panel? It would probably be easier to do from the script. Just cycle through all the chart objects with the prefix (m_name) and set OBJPROP_TIMEFRAMES to EMPTY. After you are done and call a similar cycle setting it back to OBJ_ALL_PERIODS.

Hello!
Thx for your help.
For Example: ObjectSetInteger(0,"m_EdtPosSize",OBJPROP_TIMEFRAMES,EMPTY); is correct?
And the entire panel, will it disappear if all chart objects are set to EMPTY?

"m_EdtPosSize" won't work. You should use the m_name variable that is used by the script to store the name prefix for all the panel's chart objects. Other than that, it is correct.

thx for your help