I know, I've never had any practice, that's why it's hard to learn (((
Can I turn this code into a macro?
//--- input parametersinput ENUM_DEALTYPE InDealType_01=BUY; //1.------------------------------ Order ------------------------------inputint InPrice_01 = 000; //Start priceinputdouble InVolume_01 = 0.01; //Start Volumeinput ENUM_VOLUMERATIO InVolType_01=MultiplyAlways; //Next operation with volume coefficientinputdouble InVolCoeff_01 = 1.5; //Volume coefficientinput ENUM_DISTANCERATIO InDistType_01 = NotMove; //Next price typeinputdouble InDistCoeff_01 = 1.23; //Coefficient next open priceinputint InDistShift_01 = 150; //Shift next open priceinputint InClosePips_01 = 200; //TakeProfit>0 or StopLoss<0
input ENUM_DEALTYPE InDealType_02=BUY; //2.------------------------------ Order ------------------------------inputint InPrice_02 = 000; //Start priceinputdouble InVolume_02 = 0.01; //Start Volumeinput ENUM_VOLUMERATIO InVolType_02=MultiplyAlways; //Next operation with volume coefficientinputdouble InVolCoeff_02 = 1.5; //Volume coefficientinput ENUM_DISTANCERATIO InDistType_02 = NotMove; //Next price type
inputdouble InDistCoeff_02 = 1.23; //Coefficient next open priceinputint InDistShift_02 = 150; //Shift next open priceinputint InClosePips_02 = 200; //TakeProfit>0 or StopLoss<0
And so 10 times?
I mean, there's still 8 times left... but i don't know, when i'll run it in optimizer maybe i'll add or remove parameters, i haven't finalized the code yet (comments are the same, but one digit is different - first line)
I know, I've never had any practice, that's why it's hard to learn (((
Can this code be wrapped in a macro?
And so 10 times? And the comments are the same, but one digit is different
Yes, no problem, but just no comments. Yes, and replace them with /* ... */ will not work, the compiler, in this case, stops accepting it in the context of text description of external variables for settings table. Checked.
Yes, no problem, but just no comments. Yes, and replace them with /* ... */ will not work, the compiler, in this case, stops accepting it in the context of text description of external variables for settings table. Checked.
then it's a problem, the comments will have to be corrected by hand.... It's fine for tests, it's faster anyway, I'm working on my code, it takes a lot of time to edit it, I can't get to the tester...
if you don't mind, make an example without comments
PS: maybe the idea is rubbish, but since morning I've been thinking in my head what I would like to see.... For now a grid of orders into the optimizer, but the final goal is different (instead of some fixed grid steps, I want to attach a polynomial to make the optimizer run the coefficients, then perhaps the same, but I would like to see Taylor's rows ;) ), but the grid first I need to see what the optimizer shows, a test polygon in general I prepare )))
I know, I've never had any practice, that's why it's hard to learn (((
Can I turn this code into a macro?
And so 10 times?
I mean, there's still 8 times left... but i don't know, when i'll run it in optimizer maybe i'll add or remove parameters, i haven't written code yet (comments are the same, but one digit is different - first line)
You can write a small function that will generate this code (and save to a file or clipboard).
Yes, no problem, but just no comments. Yes, and replace them with /* ... */ will not work, the compiler, in this case, stops accepting it in the context of the text description of external variables for the settings table. Checked.
Maybe you did something wrong? Or is the macros behaving differently?
Have you done something wrong? Or is the macros behaving differently?
Yes, it is different. It has to do with the fact that the preprocessor starts before the parser and stupidly collects the text, with comments inside the macro being discarded at the preprocessor's stage. At the same time, if you leave // in a macro, you may get a fierce bug through your own fault.
I've overcomplicated things )).
So, let the first one be used, it's probably the best way.
It's not a problem to write TEST several times.You can also do this, but only in reverse order everything will be called.
Hmm, thought I'd make it easier for myself to bang on the keyboard less, but now I'll have to deal with all the examples
@Vladimir Simakov cool!
@Vict thank you!
ZS: To be honest, I understand only the first example of macros, the rest are not even close to understand (((
Hmm, thought I'd make it easier for myself to bang on the keyboard less, but now I'll have to deal with all the examples
@Vladimir Simakov cool!
@Vict thank you!
ZS: To be honest, only the first example of a macro I understand, the rest are not even close to understand (((
The magic of the preprocessor is called)))
The magic of preprocessor is called)))
I know, I've never had any practice, that's why it's hard to learn (((
Can I turn this code into a macro?
And so 10 times?
I mean, there's still 8 times left... but i don't know, when i'll run it in optimizer maybe i'll add or remove parameters, i haven't finalized the code yet (comments are the same, but one digit is different - first line)
I know, I've never had any practice, that's why it's hard to learn (((
Can this code be wrapped in a macro?
And so 10 times? And the comments are the same, but one digit is different
Yes, no problem, but just no comments. Yes, and replace them with /* ... */ will not work, the compiler, in this case, stops accepting it in the context of text description of external variables for settings table. Checked.
Yes, no problem, but just no comments. Yes, and replace them with /* ... */ will not work, the compiler, in this case, stops accepting it in the context of text description of external variables for settings table. Checked.
then it's a problem, the comments will have to be corrected by hand.... It's fine for tests, it's faster anyway, I'm working on my code, it takes a lot of time to edit it, I can't get to the tester...
if you don't mind, make an example without comments
PS: maybe the idea is rubbish, but since morning I've been thinking in my head what I would like to see.... For now a grid of orders into the optimizer, but the final goal is different (instead of some fixed grid steps, I want to attach a polynomial to make the optimizer run the coefficients, then perhaps the same, but I would like to see Taylor's rows ;) ), but the grid first I need to see what the optimizer shows, a test polygon in general I prepare )))
I know, I've never had any practice, that's why it's hard to learn (((
Can I turn this code into a macro?
And so 10 times?
I mean, there's still 8 times left... but i don't know, when i'll run it in optimizer maybe i'll add or remove parameters, i haven't written code yet (comments are the same, but one digit is different - first line)
You can write a small function that will generate this code (and save to a file or clipboard).
You could write a little function that would generate this code (and save it to a file or clipboard).
well, there you go and destroy all poetic spirit, in prose it's not hard, like that:
))))
But thanks for the advice anyway!
Yes, no problem, but just no comments. Yes, and replace them with /* ... */ will not work, the compiler, in this case, stops accepting it in the context of the text description of external variables for the settings table. Checked.
Maybe you did something wrong? Or is the macros behaving differently?
Have you done something wrong? Or is the macros behaving differently?