Hi all, can you tell me what you can think of? In the indicator, there is an external parameter - extern bool save = false;, then you need to manually switch to - save = true; and the program will remember something. But when you change timeframe, you need to reset the parameter to - false;.
Run, with true, and when you change the timeframe, to change it to false?
The problem is that after a timeframe change, the value of the external variable is not reset in the indicator properties, or is this not possible?
You write an indicator (EA), compile it, the ex4 file will contain default values of external variables, correct me? You were offered a variant to react in case of TF change, it did not suit you. There are other options, but they are less trivial.
Strange, this is the first time I've seen it reversed "sell limit -> buy" and " buy limit -> sell". There is a current Bid and Ask, possible allowable levels for setting pending orders including stoplevels and freezes, but how to simply do the opposite of what you suggest - I have no idea. It completely changes the logic. Well, calculate the allowable parameters of the OrderSend function for your conditions, consider restrictions, and just - try. You can also look at the debugging information...
snail09: Strange, this is the first time I've seen "sell limit -> buy" and "buy limit -> sell" reversed. There are current Bid and Ask, possible acceptable levels for setting pending orders including stoplevels and freezes, but how to simply do the opposite of what you suggest - I have no idea. It completely changes the logic. Well, calculate the acceptable parameters of the OrderSend function for your conditions, consider restrictions, and just - try. You may also look at the debugging information...
I haven't specified it myself...:-) but maybe here the author wants to turn a debugging TC into a punching one...:-) and that's it.
snail09: ... but how to simply do the opposite of what you suggest is beyond me. The logic changes completely. Well, calculate permissible parameters of the OrderSend function for your conditions, consider restrictions, and just - try it. You can also look at the debugging information...
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
How it? I have it in indicator line settings after int init()
ArrayInitialize(Buffer,EMPTY_VALUE);
You give the default value in the init.
Hi all, can you tell me what you can think of? In the indicator, there is an external parameter - extern bool save = false;, then you need to manually switch to - save = true; and the program will remember something. But when you change timeframe, you need to reset the parameter to - false;.
Well, what's the problem
more precisely, the ctf declaration must be placed before init
The problem is that after a timeframe change, the value of the external variable is not reset in the indicator properties, or is this not possible?
Need help changing an EA
The Expert Advisor should trade on the reverse.
Instead of sell limit orders buy
and buy limit orders sell
Strange, this is the first time I've seen "sell limit -> buy" and "buy limit -> sell" reversed. There are current Bid and Ask, possible acceptable levels for setting pending orders including stoplevels and freezes, but how to simply do the opposite of what you suggest - I have no idea. It completely changes the logic. Well, calculate the acceptable parameters of the OrderSend function for your conditions, consider restrictions, and just - try. You may also look at the debugging information...
I haven't specified it myself...:-) but maybe here the author wants to turn a debugging TC into a punching one...:-) and that's it.
... but how to simply do the opposite of what you suggest is beyond me. The logic changes completely. Well, calculate permissible parameters of the OrderSend function for your conditions, consider restrictions, and just - try it. You can also look at the debugging information...