Constant Type for Dollar
-
What type should be used for amount in dollar?
numeric/int/double? -
Well I would say if you are using Constants or Variables with values that will never have decimals (i.e. Cents) then you could use Int. If your values might contain decimals then use Double. If you're not sure, use Double.
-
@droctagon thanks.
Since i use double, for $10, should i type 10 or 10.00? -
@biztet Do you mean as a Constant (ie as an input parameter)? It depends if you need cents (then you should choose double) or not (then select int).
-
Haha..thanks @l-andorrà . I'm just a little confused.
Just a little problem i'm not sure about right now.
My EA doesn't open any trade in real acc, but lots in demo.
Very confusing. Haven't face this problem before.
Even after changing MT4. -
@biztet Can you please share you project to take a look at it?
-
This is made using @roar 's treasure.
https://fxdreema.com/shared/qRbkl0XFc
Going back and do some digging and come out with this one.

-
Did you find anything suspicious?
-
@biztet Well, if this is a roar creation, I strongly recommend to ask him how it works. Honestñy I do not fully understand that reason why blocks 3 and 4 are the way they are. And are you sure blocks 12 and 13 are correctly copied from roar? They are doing absolutely nothing!
-
Thanks @l-andorrà . Actually this sample is now working perfectly on demo. I understand this program because i'm the one who requesting it. The only problem is there's no open trade on real acc. That's the only problem.
-
@biztet Then I'm afraid it goes beyond my understanding, sorry.
I hope roar can help you. -
@l-andorrà , i did some searching online and found out there's an error code 4112 saying
ERR_TRADE_EXPERT_DISABLED_BY_SERVER
Automated trading by Expert Advisors/Scripts disabled by trade server
the same error come our in expert tab in my MT4.
If its true, then what is the cause of it?

-
@biztet Wow. This is a question for real programmers. I'm afraid I cannot help you here, sorry.

-
Thanks a lot @l-andorrà .
Calling for experts, @roar , @miro1360 , @trader-philipps , @ambrogio , anyone? Need a little help here.

-
@biztet said in Constant Type for Dollar:
ERR_TRADE_EXPERT_DISABLED_BY_SERVER
it is question for none of us, but rather for your broker

your broker has not allowed automated trading on the account, specific account type or for any other reason it is blocked ... try to read in the specifics of the account whether this trading is allowed and if so, ask the casino broker why it is not allowed for you
-
-
perhaps opening 3 trades at once during one tick? try to slow down (delay) the opening process (between blocks 4-5 or 5-6)
-
Ok @miro1360 , how can i delay it, maybe like skipping 1 signal?
btw, do you have any idea how i can reduce 1 connection?

-
with Delay block?

not sure if this helps you to gain one connection

-
Wow! Thanks @miro1360 . I'll apply it to both Buy/Sell block. I'll test it. Thanks again.
