An AI can't get the ModifyPosition statement correctly

Created at 02 Jun 2025, 17:21
TE

Tenax

Joined 13.02.2023

An AI can't get the ModifyPosition statement correctly
02 Jun 2025, 17:21


 Hi, I can't  code so I use AI to write my bots and indicators. It seems it is always stuck on this one:                     ModifyPosition(position, newStopLoss, position.TakeProfit);

I got the AI to make  it that it doesn't generate an error, but I get a warning: Warning CS0618: 'Robot.ModifyPosition(Position, double?, double?)' is obsolete: 'Please use new version with ProtectionType parameter.' (C:\sers\mariu\Documents\cAlgo\Sources\Robots\TrendFollowingSL\TrendFollowingSL
\TrendFollowingSL.cs, line: 78, column: 21).

Can someone help me with this? 

Thanks 


@Tenax