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
During uploading to Market, you might have chosen wrong category.
Wrong category ? well what kind of category should be ?
I choose indicators as product and multi currency as type , so how can register a product like this one , a candle timer that counts till bar close , what category should I use , utilities and utility type informers ?
Forum on trading, automated trading systems and testing trading strategies
Register a Product as Hidden or Private
Fernando Carreiro, 2023.04.12 01:11
We can't read your mind nor see your code, but probably it has some bugs—maybe there is a mix of old and new MQL4 event handlers or maybe a mix of event handlers that should not be in the indicator.
Without analysing the code, we can't help much.
Hi, could you please tell me why this piece of code doesn't work on MAC OS ( I've tried on intel based macs and m1 based macs) , on windows works , but not on mac os.
The code should give the price in the area you clicked using SHIFT key + Click , this is the code :
the function IsTradingAllowed() is a custom function checking is the button Auto Trading is on or off and if the markets are open or not , you can ignore it or comment it out.
I've tried using other keys , but still not doing anything when using a key + click in order to give the price based on the place you clicked...
The code should give the price in the area you clicked using SHIFT key + Click , this is the code :
The above code is why your product is not being properly processed.
"init" and "deinit" is old MQL4 and "OnTick()" is modern MQL4+ but it is for EAs and not indicators.
Don't mix old and new event handlers and use only the proper handlers for the type of program being submitted.
I suggest you only use the modern and more strict MQL4+ coding for your products ... Updated MQL4 - Language Basics - MQL4 Reference
The above code is why your product is not being properly processed.
"init" and "deinit" is old MQL4 and "OnTick()" is modern MQL4+ but it is for EAs and not indicators.
Don't mix old and new event handlers and use only the proper handlers for the type of program being submitted.
I suggest you only use the modern and more strict MQL4+ coding for your products ... Updated MQL4 - Language Basics - MQL4 Reference
I wasn't talking about the indicator in the comment above. The comment above was a different question.
In the comment above I've send a piece of code from a EA / Utility type that is not working on mac os , but works on windows.
It may be a different question, but it is clear from this example, that you are mixing event handler types. So it stands to reason that the same cause applies to your initial issue of the indicator product being misclassified.
As for the Mac/Windows issue, I have little experience on the Mac, However I do believe that key states are different between the two operating systems.
I've changed to the new version of functions OnInit , OnDeinit OnTick , the problem wasn't there , the problem is that , if I check only for the SHIFT KEY was pressed is showing on mac os too the alert , then if I check only for the CLICK event also is printing the alert, the problem arrive when the two are used to inside that IF condition , when they are combined together is not working anymore.
So I've tried to create a new version for MAC only that uses MAC key codes ( is that what you meant by different key states between MAC and WINDOWS ? ) like the key code for SHIFT key on mac is 57 while on windows is 16 , but when I check for the SHIFT key as you noticed above I use this code :
So basically if I use this code to only check if the SHIFT key was press using the CHARTEVENT_KEYDOWN , is working I mean it returns 0 ..
So what else could be , any ideas ?
I've changed to the new version of functions OnInit , OnDeinit OnTick , the problem wasn't there , the problem is that , if I check only for the SHIFT KEY was pressed is showing on mac os too the alert , then if I check only for the CLICK event also is printing the alert, the problem arrive when the two are used to inside that IF condition , when they are combined together is not working anymore.
So I've tried to create a new version for MAC only that uses MAC key codes ( is that what you meant by different key states between MAC and WINDOWS ? ) like the key code for SHIFT key on mac is 57 while on windows is 16 , but when I check for the SHIFT key as you noticed above I use this code :
So basically if I use this code to only check if the SHIFT key was press using the CHARTEVENT_KEYDOWN , is working I mean it returns 0 ..
So what else could be , any ideas ?
Your topic title is "Register a Product as Hidden or Private". As this been solved or not ?
You are very unlikely to get answers to off-topic questions about Mac or keys events.
Your topic title is "Register a Product as Hidden or Private". As this been solved or not ?
You are very unlikely to get answers to off-topic questions about Mac or keys events.
It has been solved , but for now my main focus is not on the " Register a product as Hidden or Private".
I understand that this is not the place where I can get the answer for my mac and keys events , but when I ask abou this problem no body answers , and I get all kind of off topic answers ...
Anyways thanks!