[WARNING CLOSED!] Any newbie question, so as not to clutter up the forum. Professionals, don't go by. Can't go anywhere without you. - page 671

 
Me too, Roger.
 

How do I add a variable value to the comment of a position to be opened, e.g.:

int X = 100;

New_Comm="Sell_M5_Strategy_1_ --and here we need to add the value of variable X -- ";

 
artmedia70:

How do I add the value of a variable to the comment of an open position, for example..:

int X = 100;

New_Comm="Sell_M5_Strategy_1_ --and we need to add the value of variable X here -- ";

Simple addition:

int X = 100;
   
string New_Comm="Sell_M5_Стратегия_1_ --" + X + " -- ";
   
Comment(New_Comm);

The String type has the highest priority in type casting, all others will automatically be promoted to it. From the textbook, section Type conversion.

 

Do I correctly understand that IsTradeAllowed allows identifying non-working time (when there were no trades), and not only on demo or real, but also in the tester on the history?

(The task is to monitor the maximum time from certain indicator signals, and we need to exclude weekends from it - when there were no trades at all)

 
Gardenn:

Do I correctly understand that IsTradeAllowed allows identifying non-working time (when there were no trades), and not only on demo or real, but also in the tester on the history?

(The task is to monitor the maximum time from certain indicator signals, and we need to exclude weekends from it - when there was no trades at all)


I do not understand the meaning, the weekends are not shown on the history, what is the point of filtering them? There is no "nonworking time" on the history. You need to save the open time of the bar at which the signal is formed (for example, in a global variable), then using the iBarShift() function find the current shift and count the elapsed time in bars (bar = time) - it will be easier and more convenient :)

 
ToLik_SRGV:

Simple addition:

The String type has the highest priority in type conversion, all others will automatically be promoted to it. From the textbook, section Type conversion.

Huge!
 
ToLik_SRGV:

I don't get the point, weekends are not shown in the history, what is the point of filtering them? There is no "non-working time" on the history. You save the open time of the bar at which the signal is formed (for example, in a global variable), then use the iBarShift() function to find the current shift, and count the elapsed time in bars (bar = time) - it's easier and more convenient :)


Yes, I seem to have overdid it - I wanted to filter out the output time from TimeCurrent, it's more convenient to count by bars, though. Thanks!
 

1. Can balance graphs (data from test results) be plotted in other programmes?

2. Is it possible to superimpose the test results of several currencies into a single graph and obtain a single "summary" curve?

Thank you!

 
Has anyone encountered a situation where some indicators take price information from real current quotes... and not from the tester... if this problem is familiar, how can it be bypassed?
 
KRUSHNY:
Has anyone encountered a situation where some indicators take price information from real current quotes... and not from the tester... if this problem is familiar, how can it be bypassed?

I had a problem with it. My function of determining the start of the day for non-forex instruments was incorrectly prescribed. Reworked the function and everything worked.
Reason: