
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
Hello.
I decided to write my own signal module purely for cognitive purposes. I have faced a problem. I have to set pending orders. I have understood that it can be done through CExpertSignal::OpenLongParams(...). But I have a problem - my tester warns about Invalid Expiration. Having dug the source code, I realized that we can't get any type time apart fromORDER_TIME_SPECIFIED and we would like ORDER_TIME_GTC.
I have made a smart move so far, but it's not quite right. I have corrected the function in the library:
What can you advise?
Hello.
You're absolutely right. I didn't take the zero expirations into account.
Your solution is fine. I will make appropriate edits to the Standard Library.
Thank you.
Hello.
You're absolutely right. I didn't take the zero expiry into account.
Your solution is fine. I will make appropriate edits to the Standard Library.
Thank you.
That will be fine, but in the meantime, in this situation I found another way out, the right one :) By creating a class inherited from CExpert, in which I've overridden CheckOpenLong() and CheckOpenShort() functions, and I've made corrections of this kind there:
But in the meantime, I've found another way out of this situation - the right one :) By creating a class inherited from CExpert, in which I overrode CheckOpenLong() and CheckOpenShort() functions, and made corrections of this kind there:
Please explain the logic of the Expert_EveryTick parameter
If Expert_EveryTick=true, the Expert Advisor processes every tick? I.e. it checks entry/exit conditions and position tracking (trawl) on every new tick, right?
And if Expert_EveryTick=fasle - only at the first tick of a new bar? And the trail will also be triggered only at the first tick?
Please explain the logic of the Expert_EveryTick parameter
If Expert_EveryTick=true, the Expert Advisor processes every tick? I.e. it checks entry/exit conditions and position tracking (trawl) on every new tick, right?
And if Expert_EveryTick=fasle - only at the first tick of a new bar? And the trawl will also be triggered only at the first tick?
More questions about the logic of the Expert Advisor:
there is an open position e.g. buy and a fixed lot e.g. 1.
There is a signal to the other side, to sell.
what will the EA do? will be two deals of 1 lot each (the first one will close by 1 lot) or one deal of 2 lots? is there a difference between winning and losing the current buy?
If there is a buy position and again a signal to buy, what methods should I re-define to make it close?
More questions about the logic of the Expert Advisor:
1. there is an open position e.g. buy and a fixed lot e.g. 1.
there is a signal to the other side, to sell.
what should the Expert Advisor do? will it open two deals of 1 lot each (the first one will close by 1 lot) or one deal of 2 lots? is there a difference if the current buy is in the red or in the plus?
2. the EA will not go long itself, i.e. if there is a buy position and again a signal to buy? which methods should I re-define for it to go long, CheckOpenLong()?
1. Two thresholds of triggering (Expert Advisor settings). If the Close threshold is exceeded, the position simply closes, if two thresholds are exceeded (Close and Open), the position will reverse. -/+ There is no difference.
2. Processing method
1. two trigger thresholds ( EA settings). if the Close threshold is exceeded, the position will simply close. if two thresholds are exceeded (Close and Open), the position will reverse. -/+ There is no difference.
2. Processing method
The Close and Open thresholds are the result of "voting", what do ShortCondition() or LongCondition() in the signals module return?
Are the Close and Open thresholds the result of "voting" what ShortCondition() or LongCondition() returns in the signals module?
Three questions:
Theoretically, we can of course build the EA using the wizard and then add all these features manually to the code. But it is desirable that all this was implemented in the form of standard methods, i.e. for dummies who want to use the wizard, so that they don't have to get into the code and edit, for example, if they want to replace one signal module with another.