Gamestudio Links
Zorro Links
Newest Posts
long time to load data
by qin. 12/29/25 14:06
The new evaluation shell
by jcl. 12/29/25 09:56
about Zorro S (monthly)
by AndrewAMD. 12/29/25 03:24
Xor Memory Problem.
by TipmyPip. 12/26/25 19:14
ZorroFix. ini /data and /log path
by Martin_HH. 12/19/25 21:02
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
3 registered members (Quad, AndrewAMD, vicknick), 8,212 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Syndrela, HDRSEO, AOUNZA, digitalboy381, agasior
19190 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: 598
Austria
Petra Offline
Support
Petra  Offline
Support

Joined: Apr 2008
Posts: 598
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