You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
WRONG Did you even bother to READ the link you posted (https://book.mql4.com/variables/types) it says "Global variables are initialized only once before stating the execution of special functions."
Global and static variable are set when the EA is LOADED not during the deinit/init cycle.
Add a print statement just after the Slippage = Slippage * 10 and run it and change charts or time frames and look in the log if you don't want to believe the documentation of us..
Slippage is extern int which it's value is initialized on every init().
PipMultiplier is Global int, through out Molanis EA this value does not change, so the value of PipMultiplier will not change when changing TF or Symbol or opening EA property.
EA press F7 over and over
Slippage is extern int which it's value is initialized on every init().
PipMultiplier is Global int, through out Molanis EA this value does not change, so the value of PipMultiplier will not change when changing TF or Symbol or opening EA property.
EA press F7 over and over
Does your EA demonstrate the code works as intended? If I follow you correctly, Slippage reverts to my input on upon every init(). PipMultiplier = 1 in globals, but within init() if FiveDigits = true then PipMultiplier = 10... upon every init(). Given Slippage = 3 and FiveDigits = true, PipMultiplier always equals 10? 30 points, 30 points, 30 points?
Does your EA demonstrate the code works as intended? If I follow you correctly, Slippage reverts to my input on upon every init(). PipMultiplier = 1 in globals, but within init() if FiveDigits = true then PipMultiplier = 10... upon every init(). Given Slippage = 3 and FiveDigits = true, PipMultiplier always equals 10? 30 points, 30 points, 30 points?
In Molanis code, the value of PipMultiplier is remain the same, it never change, whether its five digits or not - don't worry about it. I think what you need to know is the value of Slippage - and I did check it before my reply to WHRoeder - it does not change.
Modify this on init(), attach the Molanis EA, press F7 as many as you like and the value of Slippage remain the same.
:D
In Molanis code, the value of PipMultiplier is remain the same, it never change, whether its five digits or not - don't worry about it. I think what you need to know is the value of Slippage - and I did check it before my reply to WHRoeder - it does not change.
Modify this on init(), attach the Molanis EA, press F7 as many as you like and the value of Slippage remain the same.
:D
Thank you, onewithzachy, for ending my wild goose chase.
Hello.. some help I want to build an EA of double cross moving average for MT4 ECN account
first MA period 14 shift -7
2nd MA period 14 shift -11
buy and sell and close every cross of moving average.
i read many instruction online im still confuse of building my own ea with complete setting and successful function of buy/sell and closing too.
i ask for help to those professional already how can i set the right setting of this EA.
any one can help the step by step.. I will be thankful.