Gamestudio Links
Zorro Links
Newest Posts
FXCM => AVA Trade Plugin???
by Martin_HH. 11/23/26 20:38
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
contractUpdate() is filtering if >2 rows
by mistery. 11/09/26 12:06
New Zorro version 3.15
by jcl. 11/09/26 09:24
Removing outliers from files
by jcl. 11/04/26 10:30
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
5 registered members (AndrewAMD, JeyKey II, rht, Martin_HH, Dbat), 16,182 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Altering a TRADE struct's entry price #486075
06/07/22 19:02
06/07/22 19:02
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Never worked with structs before, and neither with C for that matter, so I'm not sure how to proceed. I want to modify the entry price of a trade that is entered with enterLong() for instance. Is this possible?

I tried the following:

TRADE* T = enterLong();
T->fEntryPrice = myentry;

but the script crashes the first time these lines are executed.

I also realised that Fill=8 mode exists which is probably a better alternative for what I'm trying to do but I'm almost there with my current approach...

Re: Altering a TRADE struct's entry price [Re: MegaTanker] #486076
06/07/22 19:15
06/07/22 19:15
Joined: Apr 2008
Posts: 604
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 604
Austria
The script crashes of course when T is 0. You must always check that.

Re: Altering a TRADE struct's entry price [Re: MegaTanker] #486077
06/07/22 19:39
06/07/22 19:39
Joined: Aug 2021
Posts: 101
M
MegaTanker Offline OP
Member
MegaTanker  Offline OP
Member
M

Joined: Aug 2021
Posts: 101
Ah yes, always returns 0 during lookback crazy


Moderated by  Petra 

Powered by UBB.threads™ PHP Forum Software 7.7.1