How to temporarily stop an automatic trader - page 3

 
towmtdj:
No problem in showing my code, I'm just wondering ... how can you think it depends on the source code ? There's nothing you can do (and if there is , I sure don't know how to do it) to make your program survive deletion .....

Nothing I can do ehh?




What can I do to simply stop the program from running without having to close the platform, and if possibile, without even having to remove the program itself ? 


Try this ...

if(IsTradeAllowed()) Print("Trade allowed");

Wrap around your logic inside it and work your logic from there.

 
Why don't you just right click on your chart  - Expert advisors - Remove
 
deysmacro:

Nothing I can do ehh?





Try this ...

Wrap around your logic inside it and work your logic from there.

I did as you adviced .

The behaviour just makes me think that, once you start a program, there's no way to stop it (I mean , stop it from running ....).

What you adviced is basically making the program realize if the trading is allowed (which I came to discover, depends on how you toggle on  the autotrading switch on the tool bar...), and behave consequently .To do this, the program must be constantly running.

This can be useful of course , but what  I was asking is something different . When I talk about stopping a program, I mean really stopping it  , not hanging it until trading becomes allowed.

I cannot believe there is no way to do it, since this is one of the most basic things in all the framework that manage software like programs or scripts.

And more, when I delete it from expert advisors, it really deletes the code from the folder on disk . So if you don't know,and you didn't backup the code somewhere else, you're going to lose all your work.

I think it is quite confusing, what do you think ? 

 
GumRai:
Why don't you just right click on your chart  - Expert advisors - Remove
mmm... are you sure that feature is not going to delete ALL the advisors , and not just one ? I wouldn't dare doing it .....
 
GumRai:
Why don't you just right click on your chart  - Expert advisors - Remove
towmtdj:
mmm... are you sure that feature is not going to delete ALL the advisors , and not just one ? I wouldn't dare doing it .....

Yes I am sure, I've done it uncountable times 

It is only possible to have 1 EA running on a chart. That just simply removes the EA from the chart and doesn't affect any other charts.

 
towmtdj:

This can be useful of course , but what  I was asking is something different . When I talk about stopping a program, I mean really stopping it  , not hanging it until trading becomes allowed.

I cannot believe there is no way to do it, since this is one of the most basic things in all the framework that manage software like programs or scripts.


Actually there is. Just put external Boolean variable. If you set it to true it will run and so the otherwise. So it will depend on your setting to run or not.

Press F7 to show the EA properties.

 
towmtdj: I did as you adviced .
No you didn't or the chart wouldn't still be showing the smile face. 
 
WHRoeder:
towmtdj: I did as you adviced .
No you didn't or the chart wouldn't still be showing the smile face.
WHRoeder , you missed some messages ....
 
deysmacro:

Actually there is. Just put external Boolean variable. If you set it to true it will run and so the otherwise. So it will depend on your setting to run or not.

Press F7 to show the EA properties.

Yes , but you're still talking about hanging the program , not stopping it, right ? To read an external variable the program must be running.

Not that this is important of course, whatever hits the target is good  ....

Anyway ,  F7 on the program doesn't give  me any access to "external variable" settings ....  I just see tabs for setting position types (long, short & both),

enabling/disabling alerts ,realtime sell/buy and security .... are you sure you wanted to write F7 ?

Moreover, I am seeing right now other issues ... seems I cannot update the program, as it appears to be stopped when it's included between the expert

advisors and autotrading is on  ..... I am really, really perplexed now ....

 
towmtdj: WHRoeder , you missed some messages ....
Anyway ,  F7 on the program doesn't give  me any access to "external variable" settings ....  I just see tabs for setting position types (long, short & both),
  1. towmtdj: When I talk about stopping a program, I mean really stopping it  , not hanging it until trading becomes allowed.
    I did? I showed you how to stop it. Look again.

  2. If you define a input variable in the EA then F7/properties has an input tab